gluacrypto_crypto

package
v0.0.0-...-7035f18 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RawData = 1 << iota
)

options const

Variables

View Source
var (
	ErrNotSupport                     = errors.New("unsupported encrypt method")
	ErrCiphertextNotMultipleBlockSize = errors.New("ciphertext is not a multiple of the block size")
)

errors

Functions

func Decrypt

func Decrypt(data []byte, method string, key, iv []byte) ([]byte, error)

Decrypt data by specified method: `des-ecb`, `des-cbc`, `aes-cbc`

func Encrypt

func Encrypt(data []byte, method string, key, iv []byte) ([]byte, error)

Encrypt data by specified method: `des-ecb`, `des-cbc`, `aes-cbc`

func Loader

func Loader(L *lua.LState) int

func PKCS5Padding

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

PKCS5Padding pad data

func PKCS5Unpadding

func PKCS5Unpadding(origData []byte) []byte

PKCS5Unpadding unpad data

Types

This section is empty.

Jump to

Keyboard shortcuts

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