Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encrypt ¶
Encrypt encrypts a password using PBKDF2 algorithm The encrypted password is returned in the format: salt:iterationCount:hashedPassword The salt is a hexadecimal string The iterationCount is an integer The hashedPassword is a hexadecimal string The saltSize is the size of the salt in bytes The iterationCount is the number of iterations The hash is the hash function to be used(can be any crypto.Hash)
func Verify ¶
Verify verifies if a password matches an encrypted password The encrypted password must be in the format: salt:iterationCount:hashedPassword The salt is a hexadecimal string The iterationCount is an integer The hashedPassword is a hexadecimal string The hash is the hash function to be used(can be any crypto.Hash) it will throw an error if the encrypted password is not in the correct format
Types ¶
This section is empty.