gluacrypto_crypto

package
v0.0.0-...-6c2e20b Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: MIT, MIT Imports: 22 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