Documentation
¶
Index ¶
- func DecodeClearSigned(clearData []byte) (sigs []*packet.Signature, canonicalBody []byte, err error)
- func DecodeKeys(armoredData []byte) (pubKeys []*packet.PublicKey, privKeys []*packet.PrivateKey, err error)
- func DecodePubKey(armoredData []byte) (*packet.PublicKey, error)
- func SetDebug(debug bool)
- func SetLogger(logger log_Logger)
- func VerifyAnySignature(pubKeys []*packet.PublicKey, sigs []*packet.Signature, body []byte) error
- func VerifySignature(pubKey *packet.PublicKey, sig *packet.Signature, body []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeClearSigned ¶
func DecodeClearSigned(clearData []byte) (sigs []*packet.Signature, canonicalBody []byte, err error)
DecodeClearSigned decodes the first clearsigned message in the data and returns the signatures and the message body.
The returned canonicalBody is canonicalized by converting line endings to <CR><LF> per the openPGP RCF: https://www.rfc-editor.org/rfc/rfc4880#section-5.2.4
func DecodeKeys ¶
func DecodeKeys(armoredData []byte) (pubKeys []*packet.PublicKey, privKeys []*packet.PrivateKey, err error)
DecodeKeys decodes public and private key packets from armored data.
func DecodePubKey ¶
DecodePubKey decodes a single public key packet from armored data. The data should contain exactly one public key packet and no private key packets.
func SetDebug ¶
func SetDebug(debug bool)
Enable the delivery of debug messages to the logger. Only meaningful if a logger is also set.
func SetLogger ¶
func SetLogger(logger log_Logger)
Specify the *log.Logger object where log messages should be sent to.
func VerifyAnySignature ¶
VerifyAnySignature returns nil if any signature in sigs is a valid signature mady by any of the public keys in pubKeys.
Types ¶
This section is empty.