encrypt

package
v0.0.0-...-d60a1a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecryptWithCBC

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

AESDecryptWithCBC decrypts data using AES with CBC mode.

func AESDecryptWithECB

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

AESDecryptWithECB decrypts data using AES with ECB mode.

func AESEncryptWithCBC

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

AESEncryptWithCBC encrypts data using AES with CBC mode.

func AESEncryptWithECB

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

AESEncryptWithECB encrypts data using AES with ECB mode.

func DeriveKeyMySQL

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

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

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

func PKCS7Unpad

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

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

func SQLDecode

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

SQLDecode Function to handle the decode() function

func SQLEncode

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

SQLEncode Function to handle the encode() function

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL