Documentation ¶
Index ¶
- Constants
- func AesECBDecrypt(ciphertext, key []byte, padding string) ([]byte, error)
- func AesECBEncrypt(plaintext, key []byte, padding string) ([]byte, error)
- func NewECBDecrypter(b cipher.Block) cipher.BlockMode
- func NewECBEncrypter(b cipher.Block) cipher.BlockMode
- func PKCS5Padding(src []byte, blockSize int) []byte
- func PKCS5Unpadding(src []byte) ([]byte, error)
- func PKCS7Padding(src []byte, blockSize int) []byte
- func PKCS7UnPadding(src []byte) ([]byte, error)
- func Padding(padding string, src []byte, blockSize int) []byte
- func UnPadding(padding string, src []byte) ([]byte, error)
- func ZerosPadding(src []byte, blockSize int) []byte
- func ZerosUnPadding(src []byte) ([]byte, error)
- type Crypto
Constants ¶
View Source
const Pkcs5Padding = "PKCS5" // PKCS5填充模式
View Source
const Pkcs7Padding = "PKCS7" // PKCS7填充模式
View Source
const ZEROSPadding = "ZEROS" // ZEROS填充模式
Variables ¶
This section is empty.
Functions ¶
func AesECBDecrypt ¶
AesECBDecrypt aes解密算法,ECB模式,可以指定三种填充模式
func NewECBDecrypter ¶
NewECBDecrypter returns a BlockMode which decrypts in electronic code book mode, using the given Block.
func NewECBEncrypter ¶
NewECBEncrypter returns a BlockMode which encrypts in electronic code book mode, using the given Block.
func PKCS5Padding ¶
func PKCS5Unpadding ¶
func PKCS7Padding ¶
func PKCS7UnPadding ¶
func ZerosPadding ¶
func ZerosUnPadding ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.