glcrypto

package
v0.0.0-...-9d65353 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(crypted, key []byte) ([]byte, error)

func AesEncrypt

func AesEncrypt(origData, key []byte) ([]byte, error)

func Base64AesDeResult

func Base64AesDeResult(crypted string, key []byte) (string, error)

base64 decode, then AES-128 decrypt. key length:16, 24, 32 bytes to AES-128, AES-192, AES-256

func Base64AesEnResult

func Base64AesEnResult(orig []byte, key []byte) (string, error)

******************************************************** AES-128 encrypt, then base64 encode. key length:16, 24, 32 bytes to AES-128, AES-192, AES-256

func Base64EncodeDesResult

func Base64EncodeDesResult(orig []byte, key []byte) (string, error)

base64 encoding result of DES

func DesDecrypt

func DesDecrypt(crypted, key []byte) ([]byte, error)

len(key) == 8

func DesEncrypt

func DesEncrypt(origData, key []byte) ([]byte, error)

len(key) == 8

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func TripleDesDecrypt

func TripleDesDecrypt(crypted, key []byte) ([]byte, error)

3DES, len(key) == 24

func TripleDesEncrypt

func TripleDesEncrypt(origData, key []byte) ([]byte, error)

3DES, len(key) == 24

func ZeroPadding

func ZeroPadding(ciphertext []byte, blockSize int) []byte

func ZeroUnPadding

func ZeroUnPadding(origData []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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