crypt

package
v0.0.0-...-9439de2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyShortedThanData = errors.New("the length of key must be great or equal than length of data")

Functions

func DecryptDataAES

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

func EncryptDataAES

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

func EncryptDecryptData

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

func GenerateKeys

func GenerateKeys() (*rsa.PrivateKey, error)

func SaveKeysToFile

func SaveKeysToFile(private *rsa.PrivateKey, pub, prv io.Writer) error

func SignData

func SignData(data []byte, privateKey string) ([]byte, error)

func SignVerify

func SignVerify(data, sign []byte, publicKey string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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