Documentation
¶
Overview ¶
Package sdcrypto 加密解密工具
Index ¶
- func AESDecrypt(key, encrypted []byte) ([]byte, error)
- func AESDecryptPadding(key, encrypted []byte, p Unpadding) ([]byte, error)
- func AESEncrypt(key, data []byte) ([]byte, error)
- func AESEncryptPadding(key, data []byte, p Padding) ([]byte, error)
- func Pkcs5(data []byte, blockSize int) ([]byte, error)
- func UnPkcs5(data []byte, blockSize int) ([]byte, error)
- func UnZeros(data []byte, blockSize int) ([]byte, error)
- func Zeros(data []byte, blockSize int) ([]byte, error)
- type CRC32Encrypter
- type Encrypter
- type EncrypterFunc
- type Padding
- type Unpadding
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESDecrypt ¶
func AESEncrypt ¶
Types ¶
type CRC32Encrypter ¶
type CRC32Encrypter struct {
Encrypter Encrypter
}
type Encrypter ¶
type Encrypter interface { Encrypt(key, data []byte) ([]byte, error) Decrypt(key, crypted []byte) ([]byte, error) }
var ( AES Encrypter = &EncrypterFunc{ Encrypter: AESEncrypt, Decrypter: AESDecrypt, } AESCRC32 Encrypter = &CRC32Encrypter{AES} )
Click to show internal directories.
Click to hide internal directories.