Versions in this module Expand all Collapse all v1 v1.6.7 Feb 27, 2018 Changes in this version + var PrivateKeyType = "PGP PRIVATE KEY BLOCK" + var PublicKeyType = "PGP PUBLIC KEY BLOCK" + var SignatureType = "PGP SIGNATURE" + func ArmoredDetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) (err error) + func ArmoredDetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error + func DetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error + func DetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error + func Encrypt(ciphertext io.Writer, to []*Entity, signed *Entity, hints *FileHints, ...) (plaintext io.WriteCloser, err error) + func NewCanonicalTextHash(h hash.Hash) hash.Hash + func SymmetricallyEncrypt(ciphertext io.Writer, passphrase []byte, hints *FileHints, ...) (plaintext io.WriteCloser, err error) + type Entity struct + Identities map[string]*Identity + PrimaryKey *packet.PublicKey + PrivateKey *packet.PrivateKey + Revocations []*packet.Signature + Subkeys []Subkey + func CheckArmoredDetachedSignature(keyring KeyRing, signed, signature io.Reader) (signer *Entity, err error) + func CheckDetachedSignature(keyring KeyRing, signed, signature io.Reader) (signer *Entity, err error) + func NewEntity(name, comment, email string, config *packet.Config) (*Entity, error) + func ReadEntity(packets *packet.Reader) (*Entity, error) + func (e *Entity) Serialize(w io.Writer) error + func (e *Entity) SerializePrivate(w io.Writer, config *packet.Config) (err error) + func (e *Entity) SignIdentity(identity string, signer *Entity, config *packet.Config) error + type EntityList []*Entity + func ReadArmoredKeyRing(r io.Reader) (EntityList, error) + func ReadKeyRing(r io.Reader) (el EntityList, err error) + func (el EntityList) DecryptionKeys() (keys []Key) + func (el EntityList) KeysById(id uint64) (keys []Key) + func (el EntityList) KeysByIdUsage(id uint64, requiredUsage byte) (keys []Key) + type FileHints struct + FileName string + IsBinary bool + ModTime time.Time + type Identity struct + Name string + SelfSignature *packet.Signature + Signatures []*packet.Signature + UserId *packet.UserId + type Key struct + Entity *Entity + PrivateKey *packet.PrivateKey + PublicKey *packet.PublicKey + SelfSignature *packet.Signature + type KeyRing interface + DecryptionKeys func() []Key + KeysById func(id uint64) []Key + KeysByIdUsage func(id uint64, requiredUsage byte) []Key + type MessageDetails struct + DecryptedWith Key + EncryptedToKeyIds []uint64 + IsEncrypted bool + IsSigned bool + IsSymmetricallyEncrypted bool + LiteralData *packet.LiteralData + Signature *packet.Signature + SignatureError error + SignatureV3 *packet.SignatureV3 + SignedBy *Key + SignedByKeyId uint64 + UnverifiedBody io.Reader + func ReadMessage(r io.Reader, keyring KeyRing, prompt PromptFunction, config *packet.Config) (md *MessageDetails, err error) + type PromptFunction func(keys []Key, symmetric bool) ([]byte, error) + type Subkey struct + PrivateKey *packet.PrivateKey + PublicKey *packet.PublicKey + Sig *packet.Signature