Versions in this module Expand all Collapse all v1 v1.0.0 Oct 21, 2022 Changes in this version + const EncryptHeaderV1 + const SHA1 + const SHA256 + var HashAlg = map[string]func() hash.Hash + func Encrypt(content string, salt string, encrptAlg string) string + func ReversibleDecrypt(str, key string) (string, error) + func ReversibleEncrypt(str, key string) (string, error) + type AESEncryptor struct + func (a *AESEncryptor) Decrypt(ciphertext string) (string, error) + func (a *AESEncryptor) Encrypt(plaintext string) (string, error) + type Encryptor interface + Decrypt func(string) (string, error) + Encrypt func(string) (string, error) + func AesInstance() Encryptor + func NewAESEncryptor(keyProvider KeyProvider) Encryptor + type FileKeyProvider struct + func (f *FileKeyProvider) Get(params map[string]interface{}) (string, error) + type KeyProvider interface + Get func(params map[string]interface{}) (string, error) + func NewFileKeyProvider(path string) KeyProvider + type PresetKeyProvider struct + Key string + func (p *PresetKeyProvider) Get(params map[string]interface{}) (string, error)