signature

package
v0.0.0-...-b9a05f1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2017 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DigestManifest

func DigestManifest(data []byte) (string, error)

func FromReader

func FromReader(rd io.Reader) (string, error)

func Payload

func Payload(data []byte) ([]byte, error)

func VerifyACISignature

func VerifyACISignature(aci, asc, pubkeys string) error

VerifyACISignature is

Types

type Algorithm

type Algorithm string

Algorithm identifies and implementation of a digester by an identifier. Note the that this defines both the hash algorithm used and the string encoding.

const (
	SHA256         Algorithm = "sha256"           // sha256 with hex encoding
	SHA384         Algorithm = "sha384"           // sha384 with hex encoding
	SHA512         Algorithm = "sha512"           // sha512 with hex encoding
	TarsumV1SHA256 Algorithm = "tarsum+v1+sha256" // supported tarsum version, verification only

	// Canonical is the primary digest algorithm used with the distribution
	// project. Other digests may be used but this one is the primary storage
	// digest.
	Canonical = SHA256
)

supported digest types

func (Algorithm) Available

func (a Algorithm) Available() bool

Available returns true if the digest type is available for use. If this returns false, New and Hash will return nil.

func (Algorithm) Hash

func (a Algorithm) Hash() hash.Hash

func (Algorithm) New

func (a Algorithm) New() Digester

type Digester

type Digester interface {
	Hash() hash.Hash // provides direct access to underlying hash instance.
	Digest() string
}

Jump to

Keyboard shortcuts

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