Versions in this module Expand all Collapse all v0 v0.12.5 Mar 4, 2020 v0.12.4 Mar 3, 2020 v0.12.3 Feb 7, 2019 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work v0.12.2 Dec 13, 2018 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work v0.12.1 Dec 8, 2018 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work v0.12.0 Dec 2, 2018 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work Changes in this version + var ErrPasswordEncoderIsNil = errors.New("security/crypto: password encoder is nil") + var ErrUnableToDecrypt = errors.New("security/crypto: unable to decrypt") + func AESDecrypt(block cipher.Block, value []byte) ([]byte, error) + func AESDecryptString(key, encryptedText string) (string, error) + func AESEncrypt(block cipher.Block, value []byte) []byte + func AESEncryptString(key, text string) (string, error) + func AddPasswordAlgorithm(name string, pe PasswordEncoder) error + func InitPasswordEncoders(cfg *config.Config) error + func Sign(key, value []byte, sha string) []byte + func SignString(key, text, sha string) string + func Verify(key, value, mac []byte, sha string) bool + func VerifyString(key, text, signedText, sha string) (bool, error) + type BcryptEncoder struct + func (be *BcryptEncoder) Compare(hash, password []byte) bool + func (be *BcryptEncoder) Generate(password []byte) ([]byte, error) + type PasswordEncoder interface + Compare func(hash, password []byte) bool + Generate func(password []byte) ([]byte, error) + func PasswordAlgorithm(alg string) PasswordEncoder + type Pbkdf2Encoder struct + func (pe *Pbkdf2Encoder) Compare(hash, password []byte) bool + func (pe *Pbkdf2Encoder) Generate(password []byte) ([]byte, error) + type ScryptEncoder struct + func (se *ScryptEncoder) Compare(hash, password []byte) bool + func (se *ScryptEncoder) Generate(password []byte) ([]byte, error)