kubernetes/vendor/github.com/opencontainers/go-digest/algorithm.go

type Algorithm

const SHA256

const SHA384

const SHA512

const Canonical

var algorithms

var anchoredEncodedRegexps

// Available returns true if the digest type is available for use. If this
// returns false, Digester and Hash will return nil.
func (a Algorithm) Available() bool {}

func (a Algorithm) String() string {}

// Size returns number of bytes returned by the hash.
func (a Algorithm) Size() int {}

// Set implemented to allow use of Algorithm as a command line flag.
func (a *Algorithm) Set(value string) error {}

// Digester returns a new digester for the specified algorithm. If the algorithm
// does not have a digester implementation, nil will be returned. This can be
// checked by calling Available before calling Digester.
func (a Algorithm) Digester() Digester {}

// Hash returns a new hash as used by the algorithm. If not available, the
// method will panic. Check Algorithm.Available() before calling.
func (a Algorithm) Hash() hash.Hash {}

// Encode encodes the raw bytes of a digest, typically from a hash.Hash, into
// the encoded portion of the digest.
func (a Algorithm) Encode(d []byte) string {}

// FromReader returns the digest of the reader using the algorithm.
func (a Algorithm) FromReader(rd io.Reader) (Digest, error) {}

// FromBytes digests the input and returns a Digest.
func (a Algorithm) FromBytes(p []byte) Digest {}

// FromString digests the string input and returns a Digest.
func (a Algorithm) FromString(s string) Digest {}

// Validate validates the encoded portion string
func (a Algorithm) Validate(encoded string) error {}