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

type Digest

// NewDigest returns a Digest from alg and a hash.Hash object.
func NewDigest(alg Algorithm, h hash.Hash) Digest {}

// NewDigestFromBytes returns a new digest from the byte contents of p.
// Typically, this can come from hash.Hash.Sum(...) or xxx.SumXXX(...)
// functions. This is also useful for rebuilding digests from binary
// serializations.
func NewDigestFromBytes(alg Algorithm, p []byte) Digest {}

// NewDigestFromHex is deprecated. Please use NewDigestFromEncoded.
func NewDigestFromHex(alg, hex string) Digest {}

// NewDigestFromEncoded returns a Digest from alg and the encoded digest.
func NewDigestFromEncoded(alg Algorithm, encoded string) Digest {}

var DigestRegexp

var DigestRegexpAnchored

var ErrDigestInvalidFormat

var ErrDigestInvalidLength

var ErrDigestUnsupported

// Parse parses s and returns the validated digest object. An error will
// be returned if the format is invalid.
func Parse(s string) (Digest, error) {}

// FromReader consumes the content of rd until io.EOF, returning canonical digest.
func FromReader(rd io.Reader) (Digest, error) {}

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

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

// Validate checks that the contents of d is a valid digest, returning an
// error if not.
func (d Digest) Validate() error {}

// Algorithm returns the algorithm portion of the digest. This will panic if
// the underlying digest is not in a valid format.
func (d Digest) Algorithm() Algorithm {}

// Verifier returns a writer object that can be used to verify a stream of
// content against the digest. If the digest is invalid, the method will panic.
func (d Digest) Verifier() Verifier {}

// Encoded returns the encoded portion of the digest. This will panic if the
// underlying digest is not in a valid format.
func (d Digest) Encoded() string {}

// Hex is deprecated. Please use Digest.Encoded.
func (d Digest) Hex() string {}

func (d Digest) String() string {}

func (d Digest) sepIndex() int {}