tidb: github.com/pingcap/tidb/util/encrypt Index | Files

package encrypt

import "github.com/pingcap/tidb/util/encrypt"

Index

Package Files

aes.go crypt.go

func AESDecryptWithCBC Uses

func AESDecryptWithCBC(cryptStr, key []byte, iv []byte) ([]byte, error)

AESDecryptWithCBC decrypts data using AES with CBC mode.

func AESDecryptWithCFB Uses

func AESDecryptWithCFB(cryptStr, key []byte, iv []byte) ([]byte, error)

AESDecryptWithCFB decrypts data using AES with CFB mode.

func AESDecryptWithECB Uses

func AESDecryptWithECB(cryptStr, key []byte) ([]byte, error)

AESDecryptWithECB decrypts data using AES with ECB mode.

func AESDecryptWithOFB Uses

func AESDecryptWithOFB(cipherStr []byte, key []byte, iv []byte) ([]byte, error)

AESDecryptWithOFB decrypts data using AES with OFB mode.

func AESEncryptWithCBC Uses

func AESEncryptWithCBC(str, key []byte, iv []byte) ([]byte, error)

AESEncryptWithCBC encrypts data using AES with CBC mode.

func AESEncryptWithCFB Uses

func AESEncryptWithCFB(cryptStr, key []byte, iv []byte) ([]byte, error)

AESEncryptWithCFB decrypts data using AES with CFB mode.

func AESEncryptWithECB Uses

func AESEncryptWithECB(str, key []byte) ([]byte, error)

AESEncryptWithECB encrypts data using AES with ECB mode.

func AESEncryptWithOFB Uses

func AESEncryptWithOFB(plainStr []byte, key []byte, iv []byte) ([]byte, error)

AESEncryptWithOFB encrypts data using AES with OFB mode.

func DeriveKeyMySQL Uses

func DeriveKeyMySQL(key []byte, blockSize int) []byte

DeriveKeyMySQL derives the encryption key from a password in MySQL algorithm. See https://security.stackexchange.com/questions/4863/mysql-aes-encrypt-key-length.

func PKCS7Pad Uses

func PKCS7Pad(data []byte, blockSize int) ([]byte, error)

PKCS7Pad pads data using PKCS7. See hhttp://tools.ietf.org/html/rfc2315.

func PKCS7Unpad Uses

func PKCS7Unpad(data []byte, blockSize int) ([]byte, error)

PKCS7Unpad unpads data using PKCS7. See http://tools.ietf.org/html/rfc2315.

func SQLDecode Uses

func SQLDecode(str string, password string) (string, error)

SQLDecode Function to handle the decode() function

func SQLEncode Uses

func SQLEncode(cryptStr string, password string) (string, error)

SQLEncode Function to handle the encode() function

Package encrypt imports 4 packages (graph) and is imported by 16 packages. Updated 2019-01-23. Refresh now. Tools for package owners.