Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PKCS7Padding ¶
PKCS7Padding add the padding to the data before encrypting, to make the input a multiple of the AES block size.
func PKCS7UnPadding ¶
PKCS7UnPadding remove padding before decrypting
Types ¶
type AesCipher ¶
type AesCipher interface { Encrypt(plaintext []byte) ([]byte, error) Decrypt(encrypted []byte) ([]byte, error) Key() []byte Iv() []byte }
func AesWithRandomKey ¶
AesWithRandomKey creates and initialize AES cipher with random key and iv. The keySize argument should be either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256
Click to show internal directories.
Click to hide internal directories.