pgp

package
v0.0.0-...-f375b0e Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArmorEncryption

func ArmorEncryption(enc []byte) string

func DecodePrivate

func DecodePrivate(priv string) *packet.PrivateKey

func DecodePublic

func DecodePublic(pub string) *packet.PublicKey

func Encrypt

func Encrypt(plaintext []byte, recipients []*PGP, hidden bool) ([]byte, error)

Types

type PGP

type PGP struct {
	Public  *packet.PublicKey
	Private *packet.PrivateKey
}

func NewPGP

func NewPGP() *PGP

func (*PGP) ArmorPrivate

func (p *PGP) ArmorPrivate() string

func (*PGP) ArmorPublic

func (p *PGP) ArmorPublic() string

func (*PGP) Decrypt

func (p *PGP) Decrypt(data []byte) ([]byte, error)

func (*PGP) Entity

func (p *PGP) Entity() *openpgp.Entity

func (*PGP) Sign

func (p *PGP) Sign(data []byte) (string, error)

func (*PGP) Verify

func (p *PGP) Verify(data []byte, sigStr string) error

Jump to

Keyboard shortcuts

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