pki

package
v0.0.0-...-0e3b0c0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PGPPublicKey

type PGPPublicKey struct {
	// contains filtered or unexported fields
}

PGPPublicKey Public Key that follows the PGP standard; supports both armored & binary detached signatures

func FetchPGPPublicKey

func FetchPGPPublicKey(ctx context.Context, url string) (*PGPPublicKey, error)

FetchPGPPublicKey implements pki.PublicKey interface

func NewPGPPublicKey

func NewPGPPublicKey(r io.Reader) (*PGPPublicKey, error)

NewPGPPublicKey implements the pki.PublicKey interface

func (PGPPublicKey) CanonicalValue

func (k PGPPublicKey) CanonicalValue() ([]byte, error)

CanonicalValue implements the pki.PublicKey interface

type PGPSignature

type PGPSignature struct {
	// contains filtered or unexported fields
}

PGPSignature Signature that follows the PGP standard; supports both armored & binary detached signatures

func FetchPGPSignature

func FetchPGPSignature(ctx context.Context, url string) (*PGPSignature, error)

Fetch implements pki.Signature interface

func NewPGPSignature

func NewPGPSignature(r io.Reader) (*PGPSignature, error)

NewPGPSignature creates and validates a PGP signature object

func (PGPSignature) CanonicalValue

func (s PGPSignature) CanonicalValue() ([]byte, error)

CanonicalValue implements the pki.Signature interface

func (PGPSignature) Verify

func (s PGPSignature) Verify(r io.Reader, k interface{}) error

Verify implements the pki.Signature interface

type PublicKey

type PublicKey interface {
	CanonicalValue() ([]byte, error)
}

PublicKey Generic object representing a public key (regardless of format & algorithm)

type Signature

type Signature interface {
	CanonicalValue() ([]byte, error)
	Verify(r io.Reader, k interface{}) error
}

Signature Generic object representing a signature (regardless of format & algorithm)

Jump to

Keyboard shortcuts

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