func ClearSign(w io.Writer, signer *openpgp.Entity, message io.Reader, config *packet.Config) error
Do a cleartext signature, signing the document in "message" and writing the result to "w"
func DetachClearSign(w io.Writer, signer *openpgp.Entity, message io.Reader, config *packet.Config) error
Do a cleartext signature but skip writing the embedded original document and write just the signature block to "w"
func EntityName(entity *openpgp.Entity) string
Return the primary identity name of a PGP entity
func MergeClearSign(w io.Writer, sig []byte, message io.Reader) error
Create a cleartext signature by merging an original document stream in "message" with a detached signature in "sig" produced by DetachClearSign()
func MergeSignature(w io.Writer, sig []byte, message io.Reader, withArmor bool, filename string) (err error)
MergeSignature combines a detached signature with a cleartext message and writes it as an inline signed message with optional ASCII armor
Returned by VerifyInline if the signature is actually a detached signature
type ErrNoContent struct{}
func (ErrNoContent) Error() string
Returned by Verify* functions when the key used for signing is not in the keyring. The value is the KeyID of the missing key.
type ErrNoKey uint64
func (e ErrNoKey) Error() string
type PgpSignature struct { Key *openpgp.Key CreationTime time.Time Hash crypto.Hash }
func VerifyClearSign(signature io.Reader, cleartext io.Writer, keyring openpgp.EntityList) (*PgpSignature, error)
Verify a cleartext PGP signature in "signature" using keys from "keyring". Returns a value of ErrNoKey in the key cannot be found. If "cleartext" is not nil, then write the embedded cleartext as it is verified.
func VerifyDetached(signature, signed io.Reader, keyring openpgp.EntityList) (*PgpSignature, error)
Verify a detached PGP signature in "signature" over the document in "signed", using keys from "keyring". Returns a value of ErrNoKey if the key cannot be found.
func VerifyInline(signature io.Reader, cleartext io.Writer, keyring openpgp.EntityList) (*PgpSignature, error)
Verify an inline PGP signature in "signature" using keys from "keyring". Returns a value of ErrNoKey if the key cannot be found. If "cleartext" is not nil, then write the embedded cleartext as it is verified.