crypto

package
v0.0.0-...-2646bee Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrivateKeyToBytes

func PrivateKeyToBytes(priv *rsa.PrivateKey) ([]byte, error)

func PublicKeyToBytes

func PublicKeyToBytes(pub *rsa.PublicKey) ([]byte, error)

Types

type AES256_CBC

type AES256_CBC struct{}

func (AES256_CBC) Decrypt

func (a AES256_CBC) Decrypt(key string, data []byte) ([]byte, error)

func (AES256_CBC) DecryptWithPrivateKey

func (a AES256_CBC) DecryptWithPrivateKey(key *rsa.PrivateKey, plain []byte) ([]byte, error)

func (AES256_CBC) Encrypt

func (a AES256_CBC) Encrypt(key string, plain []byte) ([]byte, error)

func (AES256_CBC) EncryptWithPublicKey

func (a AES256_CBC) EncryptWithPublicKey(key *rsa.PublicKey, plain []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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