Documentation ¶
Index ¶
- Variables
- func AESCBCDecryption(password string, ciphertext []byte) ([]byte, error)
- func AESCBCEncryption(password string, plaintext []byte) ([]byte, error)
- func AESGCMDecryption(password string, ciphertext []byte, nonce []byte) ([]byte, error)
- func AESGCMEncryption(password string, plaintext []byte, nonce []byte) ([]byte, []byte, error)
- func AESPassword(password string) []byte
- func AESStreamDecryption(password string, mode MODE, ciphertext []byte) ([]byte, error)
- func AESStreamDecryptionFile(password string, mode MODE, inpath, outpath string) error
- func AESStreamDecryptionStream(password string, mode MODE, in io.Reader, out io.Writer) error
- func AESStreamEncryption(password string, mode MODE, plaintext []byte) ([]byte, error)
- func AESStreamEncryptionFile(password string, mode MODE, inpath, outpath string) error
- func AESStreamEncryptionStream(password string, mode MODE, in io.Reader, out io.Writer) error
- func CBCCiphertext(ciphertext []byte) []byte
- func CBCPlaintext(plaintext []byte) []byte
- func DefaultIV(bt []byte) error
- func DefaultNonce(bt []byte)
- type MODE
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrMODENotExists 加密解密的模式不存在 ErrMODENotExists = errors.New("MODE错误") //ErrAESPasswordTolang AES加密的秘钥长度过长,超过了32位 ErrAESPasswordTolang = errors.New("AES加密的秘钥长度过长") //ErrAESIVLength AES的iv长度默认为16 ErrAESIVLength = errors.New("AES iv 长度错误") //ErrAESStreamIv 从数据流获取iv数据失败 ErrAESStreamIv = errors.New("获取iv数据失败") )
Functions ¶
func AESCBCDecryption ¶
AESCBCDecryption AES CBC解密
func AESCBCEncryption ¶
AESCBCEncryption AES CBC加密
func AESGCMDecryption ¶
AESGCMDecryption AES解密的GCM模式
func AESGCMEncryption ¶
AESGCMEncryption AES加密的GCM模式
func AESStreamDecryption ¶
AESStreamDecryption AES CFB/CTR/OFB
func AESStreamDecryptionFile ¶
AESStreamDecryptionFile AES CFB/CTR/OFB 文件
func AESStreamDecryptionStream ¶
AESStreamDecryptionStream AES CFB/CTR/OFB 文件
func AESStreamEncryption ¶
AESStreamEncryption AES CFB/CTR/OFB
func AESStreamEncryptionFile ¶
AESStreamEncryptionFile AES CFB/CTR/OFB 文件
func AESStreamEncryptionStream ¶
AESStreamEncryptionStream AES CFB/CTR/OFB 文件
func CBCCiphertext ¶
CBCCiphertext cbc模式下对0进行填充的数据进行原始数据提取
Types ¶
Click to show internal directories.
Click to hide internal directories.