pgputil

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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

func DecodePubKey(armoredData []byte) (*packet.PublicKey, error)

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

func VerifyAnySignature(pubKeys []*packet.PublicKey, sigs []*packet.Signature, body []byte) error

VerifyAnySignature returns nil if any signature in sigs is a valid signature mady by any of the public keys in pubKeys.

func VerifySignature

func VerifySignature(pubKey *packet.PublicKey, sig *packet.Signature, body []byte) error

VerifySignature returns nil if sig is a valid signature from pubKey.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL