Documentation ¶
Index ¶
- func AESDecryptWithCBC(cryptStr, key []byte, iv []byte) ([]byte, error)
- func AESDecryptWithCFB(cryptStr, key []byte, iv []byte) ([]byte, error)
- func AESDecryptWithECB(cryptStr, key []byte) ([]byte, error)
- func AESDecryptWithOFB(cipherStr []byte, key []byte, iv []byte) ([]byte, error)
- func AESEncryptWithCBC(str, key []byte, iv []byte) ([]byte, error)
- func AESEncryptWithCFB(cryptStr, key []byte, iv []byte) ([]byte, error)
- func AESEncryptWithECB(str, key []byte) ([]byte, error)
- func AESEncryptWithOFB(plainStr []byte, key []byte, iv []byte) ([]byte, error)
- func DeriveKeyMySQL(key []byte, blockSize int) []byte
- func PKCS7Pad(data []byte, blockSize int) ([]byte, error)
- func PKCS7Unpad(data []byte, blockSize int) ([]byte, error)
- func SQLDecode(str string, password string) (string, error)
- func SQLEncode(cryptStr string, password string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESDecryptWithCBC ¶
AESDecryptWithCBC decrypts data using AES with CBC mode.
func AESDecryptWithCFB ¶
AESDecryptWithCFB decrypts data using AES with CFB mode.
func AESDecryptWithECB ¶
AESDecryptWithECB decrypts data using AES with ECB mode.
func AESDecryptWithOFB ¶
AESDecryptWithOFB decrypts data using AES with OFB mode.
func AESEncryptWithCBC ¶
AESEncryptWithCBC encrypts data using AES with CBC mode.
func AESEncryptWithCFB ¶
AESEncryptWithCFB decrypts data using AES with CFB mode.
func AESEncryptWithECB ¶
AESEncryptWithECB encrypts data using AES with ECB mode.
func AESEncryptWithOFB ¶
AESEncryptWithOFB encrypts data using AES with OFB mode.
func DeriveKeyMySQL ¶
DeriveKeyMySQL derives the encryption key from a password in MySQL algorithm. See https://security.stackexchange.com/questions/4863/mysql-aes-encrypt-key-length.
func PKCS7Unpad ¶
PKCS7Unpad unpads data using PKCS7. See http://tools.ietf.org/html/rfc2315.
Types ¶
This section is empty.