pmpgp

package module
v0.0.0-...-fdadba3 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signer

type Signer struct {
	PrivateKey *packet.PrivateKey
}

func (Signer) Sign

func (s Signer) Sign(h hash.Hash, hashType crypto.Hash, creationTime time.Time) ([]byte, error)

type Verifier

type Verifier struct {
	// EntityList retrieves known public keys by ID
	EntityList openpgp.EntityList
	// ParseOnly disables signature verification.
	// Verifier parses and returns only the Key ID from each signature.
	// Keys will not be searched in EntityList and errors will not be raised for unknown keys.
	ParseOnly bool
}

Verifier uses ProtonMail's forked openpgp implementation. This implementation has removed many obsolete features, including signature V3 packets which are still frequently found even in newer RPM-based distributions.

func (Verifier) ParseSignature

func (v Verifier) ParseSignature(blob []byte) (*internal.Signature, error)

Jump to

Keyboard shortcuts

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