Documentation
¶
Index ¶
- func CBCDecrypt(encryptedData, key []byte) (decryptedData []byte, err error)
- func CBCEncrypt(origData, key []byte) (crypted []byte, err error)
- func ECBDecrypt(encryptedData, key []byte) (origData []byte, err error)
- func ECBDecryptEx(encryptedData, key []byte, paddingType PaddingType) (origData []byte, err error)
- func ECBEncrypt(origData, key []byte) (encryptedData []byte, err error)
- func ECBEncryptEx(origData, key []byte, paddingType PaddingType) (encryptedData []byte, err error)
- func NewECBDecrypter(b cipher.Block) cipher.BlockMode
- func NewECBEncryptor(b cipher.Block) cipher.BlockMode
- func PKCS5Padding(plaintext []byte) []byte
- func PKCS5UnPadding(origData []byte) ([]byte, error)
- func PKCS7Padding(plaintext []byte, blockSize int) []byte
- func PKCS7UnPadding(origData []byte) ([]byte, error)
- func PKCSUnPadding(origData []byte) ([]byte, error)
- type PaddingType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CBCDecrypt ¶
func CBCEncrypt ¶
func ECBDecrypt ¶
func ECBDecryptEx ¶
func ECBDecryptEx(encryptedData, key []byte, paddingType PaddingType) (origData []byte, err error)
func ECBEncrypt ¶
func ECBEncryptEx ¶
func ECBEncryptEx(origData, key []byte, paddingType PaddingType) (encryptedData []byte, err error)
func NewECBDecrypter ¶
NewECBDecrypter returns a BlockMode which decrypts in electronic code book mode, using the given Block.
func NewECBEncryptor ¶
NewECBEncryptor returns a BlockMode which encrypts in electronic code book mode, using the given Block.
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func PKCS7Padding ¶
func PKCS7UnPadding ¶
func PKCSUnPadding ¶
Types ¶
type PaddingType ¶
type PaddingType int
const ( PaddingTypeNone PaddingType = iota PaddingTypePKCS5 PaddingTypePKCS7 )
Click to show internal directories.
Click to hide internal directories.