ciphers

package
v0.0.0-...-8a88764 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodePrivateKeyToPEM

func EncodePrivateKeyToPEM(privateKey *rsa.PrivateKey) []byte

EncodePrivateKeyToPEM encodes private key to PEM format

func GeneratePrivateKey

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

GeneratePrivateKey generates new rsa private key

Types

type Decrypt

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

Decrypt offers decryption pipe

func NewDecrypt

func NewDecrypt(priv, passwd []byte) (*Decrypt, error)

NewDecrypt returns instance of Encrypt or error otherwise

func (*Decrypt) Pipe

func (d *Decrypt) Pipe(rd io.Reader, wr io.Writer) error

Pipe pipes bytes from reader to writer performing cryptographic decryption

type Encrypt

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

Encrypt offers encryption pipe

func NewEncrypt

func NewEncrypt(priv, passwd []byte) (*Encrypt, error)

NewEncrypt returns instance of Encrypt or error otherwise

func (*Encrypt) Pipe

func (e *Encrypt) Pipe(rd io.Reader, wr io.Writer) error

Pipe pipes bytes from reader to writer performing cryptographic encryption

Jump to

Keyboard shortcuts

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