autograph: Index | Files

package pgp

import ""


Package Files



const (
    // Type of this signer is "pgp", which represents a signer
    // that uses the native to sign
    // data
    Type = "pgp"

func Unmarshal Uses

func Unmarshal(sigstr string) (signer.Signature, error)

Unmarshal also does very little. It simply converts the armored signature from a string to an []byte, but doesn't attempt to parse it, and returns it as a Signature

type Options Uses

type Options struct {

Options are not implemented for this signer

type PGPSigner Uses

type PGPSigner struct {
    // contains filtered or unexported fields

PGPSigner holds the configuration of the signer

func New Uses

func New(conf signer.Configuration) (s *PGPSigner, err error)

New initializes a pgp signer using a configuration

func (*PGPSigner) Config Uses

func (s *PGPSigner) Config() signer.Configuration

Config returns the configuration of the current signer

func (*PGPSigner) GetDefaultOptions Uses

func (s *PGPSigner) GetDefaultOptions() interface{}

GetDefaultOptions returns default options of the signer

func (*PGPSigner) SignData Uses

func (s *PGPSigner) SignData(data []byte, options interface{}) (signer.Signature, error)

SignData takes data and returns an armored signature with pgp header and footer

type Signature Uses

type Signature struct {
    Data []byte

Signature is a PGP signature

func (*Signature) Marshal Uses

func (sig *Signature) Marshal() (string, error)

Marshal doesn't do much for this signer. sig.Data already contains an armored signature, so we simply convert it to a string and return it

Package pgp imports 5 packages (graph) and is imported by 2 packages. Updated 2019-04-12. Refresh now. Tools for package owners.