encrypt

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecryptWithECB

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

AESDecryptWithECB decrypts data using AES with ECB 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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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