Versions in this module Expand all Collapse all v1 v1.2.0 Nov 11, 2020 Changes in this version + var FailDelay = 3 * time.Second + func DecryptKey(data []byte, key []byte) ([]byte, error) + func EncryptKey(data []byte, key []byte) ([]byte, error) v1.1.0 Oct 23, 2020 Changes in this version + const HashingAlgorithmArgon2id + const HashingAlgorithmBCrypt + func HashSHA256(raw []byte) []byte + func HashSHA256String(raw string) string + func HashSHA512(raw []byte) []byte + func HashSHA512String(raw string) string + func PassphraseToEncryptionKey(raw string) []byte + func RandomBytes(length uint16) []byte type HashedPassword + func HashPasswordAlgorithm(password []byte, alg HashingAlgorithm) (*HashedPassword, error) + func (p HashedPassword) Algorithm() HashingAlgorithm + func (p HashedPassword) Upgrade(password []byte) *HashedPassword + type Hasher struct + type HashingAlgorithm string v1.0.5 Feb 28, 2020 Changes in this version + func Decrypt(data []byte, passphrase string) ([]byte, error) + func Encrypt(data []byte, passphrase string) ([]byte, error) + func HashKey(raw string) []byte + func HashString(raw string) string + func RandomNumber(min int, max int) int + func RandomString(length uint16) string + func SecureRandom(length uint16) []byte + type HashedPassword string + func HashPassword(raw string) HashedPassword + func (hash HashedPassword) Compare(raw string) bool + func (hash HashedPassword) String() string