Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidAlgorithm = errors.New("aesecb: invalid encryption algorithm")
ErrInvalidAlgorithm represents invalid encryption algorithm error
Functions ¶
This section is empty.
Types ¶
type Crypto ¶
type Crypto interface { Encrypt(text string) (string, error) Decrypt(encryptedText string) (string, error) EncryptStruct(instance interface{}) (interface{}, error) DecryptStruct(encryptedInstance interface{}) (interface{}, error) }
Crypto hols methods to encrypt and decrypt data
func NewAES128ECB ¶
NewAES128ECB instantiate a new Crypto using AES 128 with ECB
Click to show internal directories.
Click to hide internal directories.