package crypto type HashFunction string const ( pbkdf2Type HashFunction = "pbkdf2" bcryptType HashFunction = "bcrypt" sha512Type HashFunction = "sha512" ) func (hf HashFunction) Type() string { switch hf { case pbkdf2Type: return "sha512" case bcryptType: return "blowfish" case sha512Type: return "sha512" default: return "" } } type Credential interface { Hashed() []byte Plain() string HashFunction() string HashType() string Iterations() (int, error) Salt() ([]byte, error) } type AsymmetricKeyPair interface { PublicKey() string PrivateKey() string }