encrypter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes2PublicKey

func Bytes2PublicKey(publicKeyBytes []byte) crypto.PublicKey

func PublicKey2Bytes

func PublicKey2Bytes(publicKey crypto.PublicKey) []byte

Types

type Cipher

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

func NewCipher

func NewCipher(privKey crypto.PrivateKey, pubKey crypto.PublicKey) *Cipher

func (*Cipher) Decrypt

func (c *Cipher) Decrypt(rand io.Reader, msg []byte, _ crypto.DecrypterOpts) (plaintext []byte, err error)

func (*Cipher) Public

func (c *Cipher) Public() crypto.PublicKey

func (*Cipher) PublicKeyBytes

func (c *Cipher) PublicKeyBytes() []byte

func (*Cipher) Sign

func (c *Cipher) Sign(rand io.Reader, digest []byte, _ crypto.SignerOpts) ([]byte, error)

Jump to

Keyboard shortcuts

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