crypto

package
v0.0.0-...-ba55b63 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecrypt

func AESDecrypt(key, ciphertext []byte) ([]byte, error)

func AESEncrypt

func AESEncrypt(key, data []byte) ([]byte, error)

func DecryptData

func DecryptData(ciphertext []byte, prvHex string) ([]byte, error)

func EncryptData

func EncryptData(data []byte, pubHex string) ([]byte, error)

func GenerateRandomKey

func GenerateRandomKey() ([]byte, error)

func PKCS5Padding

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

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func SignatureMessage

func SignatureMessage(data []byte, prvHex string) ([]byte, error)

func VerifySignature

func VerifySignature(data []byte, pubHex string, signature []byte) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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