Versions in this module Expand all Collapse all v1 v1.0.0 Nov 16, 2020 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 EncryptText(ciphertext io.Writer, to []*Entity, signed *Entity, hints *FileHints, ...) (plaintext io.WriteCloser, err error) + func NewCanonicalTextHash(h hash.Hash) hash.Hash + func Sign(output io.Writer, signed *Entity, hints *FileHints, config *packet.Config) (input io.WriteCloser, err error) + 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, config *packet.Config) (signer *Entity, err error) + func CheckDetachedSignature(keyring KeyRing, signed, signature io.Reader, config *packet.Config) (signer *Entity, err error) + func CheckDetachedSignatureAndHash(keyring KeyRing, signed, signature io.Reader, expectedHashes []crypto.Hash, ...) (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) AddEncryptionSubkey(config *packet.Config) error + func (e *Entity) AddSigningSubkey(config *packet.Config) error + func (e *Entity) EncryptionKey(now time.Time) (Key, bool) + func (e *Entity) PrimaryIdentity() *Identity + func (e *Entity) RevokeKey(reason packet.ReasonForRevocation, reasonText string, config *packet.Config) error + func (e *Entity) RevokeSubkey(sk *Subkey, reason packet.ReasonForRevocation, reasonText string, ...) error + func (e *Entity) Serialize(w io.Writer) error + func (e *Entity) SerializePrivate(w io.Writer, config *packet.Config) (err error) + func (e *Entity) SerializePrivateWithoutSigning(w io.Writer, config *packet.Config) (err error) + func (e *Entity) SignIdentity(identity string, signer *Entity, config *packet.Config) error + func (e *Entity) SigningKey(now time.Time) (Key, bool) + 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 + 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