crypto

package
v0.0.0-...-f899974 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypto

type Crypto interface {
	Encrypt(key, plaintext []byte) ([]byte, error)
	Decrypt(key, ciphertext []byte) ([]byte, error)
	EncryptRSA(pubKey *rsa.PublicKey, plaintext []byte) ([]byte, error)
	DecryptRSA(privKey *rsa.PrivateKey, ciphertext []byte) ([]byte, error)
}

type CryptoHelper

type CryptoHelper struct {
}

func (*CryptoHelper) Decrypt

func (c *CryptoHelper) Decrypt(key, ciphertext []byte) ([]byte, error)

func (*CryptoHelper) DecryptRSA

func (c *CryptoHelper) DecryptRSA(privKey *rsa.PrivateKey, ciphertext []byte) ([]byte, error)

func (*CryptoHelper) Encrypt

func (c *CryptoHelper) Encrypt(key, plaintext []byte) ([]byte, error)

func (*CryptoHelper) EncryptRSA

func (c *CryptoHelper) EncryptRSA(pubKey *rsa.PublicKey, plaintext []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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