crypto

package
v0.0.0-...-299d4c7 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(bs []byte) ([]byte, error)

AesDecrypt default key & iv decrypt

func AesEncrypt

func AesEncrypt(bs []byte) ([]byte, error)

AesEncrypt default key & iv encrypt

func SetAESDefaultKeyIV

func SetAESDefaultKeyIV(key, iv string)

SetAESDefaultKeyIV set default key & iv

Types

type AES

type AES struct {
	// contains filtered or unexported fields
}

AES aes

func NewAES

func NewAES(key, iv string) *AES

NewAES new

func (*AES) Decrypt

func (c *AES) Decrypt(bs []byte) (ds []byte, err error)

Decrypt decrypt data

func (*AES) Encrypt

func (c *AES) Encrypt(bs []byte) (crypted []byte, err error)

Encrypt encrypt data

func (*AES) SetKeyIV

func (c *AES) SetKeyIV(key, iv string)

SetKeyIV set key & iv

Jump to

Keyboard shortcuts

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