Versions in this module Expand all Collapse all v1 v1.3.0 Mar 20, 2023 v1.2.1 Sep 22, 2022 v1.2.0 Apr 16, 2021 v1.1.0 May 12, 2020 Changes in this version + const EncryptKeyPubLen + const FlagMDC + const SignKeyPubLen + var ErrArmorCRC = errors.New("invalid armored checksum") + var ErrDecryptKey = errors.New("wrong encryption key") + var ErrInvalidArmor = errors.New("invalid armored data") + var ErrInvalidPacket = errors.New("invalid OpenPGP data") + var ErrNoData = errors.New("no OpenPGP data found") + var ErrUnsupportedPacket = errors.New("input packet unsupported") + func Armor(buf []byte) []byte + func Dearmor(buf []byte) ([]byte, error) + type EncryptKey struct + Key []byte + func (k *EncryptKey) Created() int64 + func (k *EncryptKey) EncPacket(passphrase []byte) []byte + func (k *EncryptKey) Expires() int64 + func (k *EncryptKey) Load(packet Packet, passphrase []byte) (err error) + func (k *EncryptKey) Packet() []byte + func (k *EncryptKey) PubPacket() []byte + func (k *EncryptKey) Pubkey() []byte + func (k *EncryptKey) Seckey() []byte + func (k *EncryptKey) Seed(seed []byte) + func (k *EncryptKey) SetCreated(time int64) + func (k *EncryptKey) SetExpires(time int64) + type Packet struct + Body []byte + HdrLen int + Tag byte + func ParsePacket(buf []byte) (Packet, []byte, error) + func (p *Packet) Encode() []byte + type SignKey struct + Key ed25519.PrivateKey + func (k *SignKey) Bind(subkey *EncryptKey, when int64) []byte + func (k *SignKey) Certify(key, uid []byte, when int64) []byte + func (k *SignKey) Clearsign(src io.Reader) io.ReadCloser + func (k *SignKey) Created() int64 + func (k *SignKey) EncPacket(passphrase []byte) []byte + func (k *SignKey) Expires() int64 + func (k *SignKey) KeyID() []byte + func (k *SignKey) Load(packet Packet, passphrase []byte) (err error) + func (k *SignKey) Packet() []byte + func (k *SignKey) PubPacket() []byte + func (k *SignKey) Pubkey() []byte + func (k *SignKey) Seckey() []byte + func (k *SignKey) Seed(seed []byte) + func (k *SignKey) SelfSign(userid *UserID, when int64, flags int) []byte + func (k *SignKey) SetCreated(time int64) + func (k *SignKey) SetExpires(time int64) + func (k *SignKey) Sign(src io.Reader) ([]byte, error) + type UserID struct + ID []byte + func (u *UserID) Load(packet Packet) (err error) + func (u *UserID) Packet() []byte