Exemple #1
0
func register(config Config) error {
	// Constructor function. Provide fresh copy each time.
	fn := func() bridge.Implementer {
		c := config
		return &c
	}

	enc := bridge.New([]byte("scrypt"), fn)

	return mcf.Register(mcf.SCRYPT, enc)
}
Exemple #2
0
func register(config Config) error {

	// Constructor for Implementer. Always return a fresh copy.
	fn := func() bridge.Implementer {
		c := config
		return &c
	}

	// the bridge handles the generic parts of the interface
	enc := bridge.New([]byte("pbkdf2"), fn)

	return mcf.Register(mcf.PBKDF2, enc)
}
Exemple #3
0
func register(c config) error {
	return mcf.Register(mcf.BCRYPT, &c)
}