Documentation ¶
Index ¶
- func AESDecryptWithCBC(cryptStr, key []byte, iv []byte) ([]byte, error)
- func AESDecryptWithECB(cryptStr, key []byte) ([]byte, error)
- func AESEncryptWithCBC(str, key []byte, iv []byte) ([]byte, error)
- func AESEncryptWithECB(str, key []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 AESDecryptWithECB ¶
AESDecryptWithECB decrypts data using AES with ECB mode.
func AESEncryptWithCBC ¶
AESEncryptWithCBC encrypts data using AES with CBC mode.
func AESEncryptWithECB ¶
AESEncryptWithECB encrypts data using AES with ECB 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.
Click to show internal directories.
Click to hide internal directories.