pgp

package
v0.0.0-...-9b5a78d Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetachSign

func DetachSign(keyPathList []string, msg string, signer string) (string, string, error)

func EntityListToSlice

func EntityListToSlice(keyring openpgp.EntityList) []*openpgp.Entity

func FindSignerKey

func FindSignerKey(keyring openpgp.EntityList, signer string) *openpgp.Entity

func GetFirstIdentity

func GetFirstIdentity(signer *openpgp.Entity) *openpgp.Identity

func LoadKeyRing

func LoadKeyRing(keyPathList []string) (openpgp.EntityList, error)

func MatchIdentity

func MatchIdentity(idt *openpgp.Identity, signer string) bool

Types

type Signer

type Signer struct {
	Email              string `json:"email,omitempty"`
	Name               string `json:"name,omitempty"`
	Comment            string `json:"comment,omitempty"`
	Uid                string `json:"uid,omitempty"`
	Country            string `json:"country,omitempty"`
	Organization       string `json:"organization,omitempty"`
	OrganizationalUnit string `json:"organizationalUnit,omitempty"`
	Locality           string `json:"locality,omitempty"`
	Province           string `json:"province,omitempty"`
	StreetAddress      string `json:"streetAddress,omitempty"`
	PostalCode         string `json:"postalCode,omitempty"`
	CommonName         string `json:"commonName,omitempty"`
	SerialNumber       string `json:"serialNumber,omitempty"`
}

func GetSignersFromEntityList

func GetSignersFromEntityList(keyring openpgp.EntityList) []*Signer

func NewSignerFromUserId

func NewSignerFromUserId(uid *packet.UserId) *Signer

func VerifySignature

func VerifySignature(keyPathList []string, msg, sig string) (bool, string, *Signer, error)

func (*Signer) EqualTo

func (s *Signer) EqualTo(s2 *Signer) bool

Jump to

Keyboard shortcuts

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