Documentation ¶
Overview ¶
Package aesutil provides aes encryption and decryption.
Index ¶
- Constants
- func AdjustKey(key []byte) (cipher.Block, error)
- func CbcDecrypt(cipherText, key, iv []byte) (plaintext []byte, err error)
- func CbcEncrypt(plaintext, key, iv []byte) (ciphertext []byte, err error)
- func CfbDecrypt(cipherText, key, iv []byte) (plaintext []byte, err error)
- func CfbEncrypt(plaintext, key, iv []byte) (ciphertext []byte, err error)
- func CtrDecrypt(cipherText, key, iv []byte) (plaintext []byte, err error)
- func CtrEncrypt(plaintext, key, iv []byte) (ciphertext []byte, err error)
- func GcmDecrypt(cipherText, key, nonce []byte) (plaintext []byte, err error)
- func GcmEncrypt(plaintext, key, nonce []byte) (ciphertext []byte, err error)
- func OfbDecrypt(cipherText, key, iv []byte) (plaintext []byte, err error)
- func OfbEncrypt(plaintext, key, iv []byte) (ciphertext []byte, err error)
- func Pkcs7Padding(data []byte, blockSize int) ([]byte, error)
- func Pkcs7UnPadding(data []byte, blockSize int) ([]byte, error)
- func ZeroPadding(data []byte, blockSize int) []byte
- func ZeroUnPadding(data []byte) []byte
Constants ¶
View Source
const ( Aes128 = 16 Aes192 = 24 Aes256 = 32 )
Variables ¶
This section is empty.
Functions ¶
func CbcDecrypt ¶
func CbcEncrypt ¶
CbcEncrypt aes cbc encrypt, refer to https://pkg.go.dev/crypto/cipher@latest#example-NewCBCDecrypter
func CfbDecrypt ¶
func CfbEncrypt ¶
func CtrDecrypt ¶
func CtrEncrypt ¶
func GcmDecrypt ¶
func GcmEncrypt ¶
func OfbDecrypt ¶
func OfbEncrypt ¶
func ZeroPadding ¶
func ZeroUnPadding ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.