pgp

package
v0.0.0-...-8845ca5 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EntityList openpgp.EntityList

Functions

func AppendEntity

func AppendEntity(pub, priv []byte) error

func Decrypt

func Decrypt(encrypted []byte) ([]byte, error)

func DecryptText

func DecryptText(tag string, encrypted []byte) ([]byte, error)

func DecryptTextWithEntities

func DecryptTextWithEntities(tag string, encrypted []byte, entities openpgp.EntityList) ([]byte, error)

func DecryptWithEntities

func DecryptWithEntities(encrypted []byte, entities openpgp.EntityList) ([]byte, error)

func Encrypt

func Encrypt(message []byte) ([]byte, error)

func EncryptText

func EncryptText(tag string, message []byte) ([]byte, error)

func EncryptTextWithEntities

func EncryptTextWithEntities(tag string, message []byte, entities openpgp.EntityList) ([]byte, error)

func EncryptWithEntities

func EncryptWithEntities(message []byte, entities openpgp.EntityList) ([]byte, error)

func GetEntities

func GetEntities(pub, priv []byte) (openpgp.EntityList, error)

func Register

func Register(pub, priv []byte) (err error)

Register 注册私钥、公钥 如果不注册私钥,无法解密

Types

type KeyPair

type KeyPair struct {
	PublicKey  []byte
	PrivateKey []byte
}

func Gen

func Gen(fullname string, comment string, email string, config *packet.Config) (*KeyPair, error)

Jump to

Keyboard shortcuts

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