Documentation ¶
Index ¶
- func ClearSign(w io.Writer, signer *openpgp.Entity, message io.Reader, config *packet.Config) error
- func DetachClearSign(w io.Writer, signer *openpgp.Entity, message io.Reader, config *packet.Config) error
- func EntityName(entity *openpgp.Entity) string
- func MergeClearSign(w io.Writer, sig []byte, message io.Reader) error
- func MergeSignature(w io.Writer, sig []byte, message io.Reader, withArmor bool, filename string) (err error)
- type ErrNoContent
- type ErrNoKey
- type PgpSignature
- func VerifyClearSign(signature io.Reader, cleartext io.Writer, keyring openpgp.EntityList) (*PgpSignature, error)
- func VerifyDetached(signature, signed io.Reader, keyring openpgp.EntityList) (*PgpSignature, error)
- func VerifyInline(signature io.Reader, cleartext io.Writer, keyring openpgp.EntityList) (*PgpSignature, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearSign ¶
Do a cleartext signature, signing the document in "message" and writing the result to "w"
func DetachClearSign ¶
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 ¶
Return the primary identity name of a PGP entity
func MergeClearSign ¶
Create a cleartext signature by merging an original document stream in "message" with a detached signature in "sig" produced by DetachClearSign()
Types ¶
type ErrNoContent ¶
type ErrNoContent struct{}
Returned by VerifyInline if the signature is actually a detached signature
func (ErrNoContent) Error ¶
func (ErrNoContent) Error() string
type ErrNoKey ¶
type ErrNoKey uint64
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 PgpSignature ¶
func VerifyClearSign ¶
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 ¶
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 ¶
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.