Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/opencontainers/go-digest
/ functions
Functions
72 in github.com/opencontainers/go-digest
⨍
Functions
72
◇
Types & classes
9
↓ 11 callers
Method
Add
Add adds the given digest to the set. An error will be returned if the given digest is invalid. If the digest already exists in the set, this operatio
digestset/set.go:128
↓ 11 callers
Method
Lookup
Lookup looks for a digest matching the given string representation. If no digests could be found ErrDigestNotFound will be returned with an empty dige
digestset/set.go:84
↓ 8 callers
Method
Algorithm
Algorithm returns the algorithm portion of the digest. This will panic if the underlying digest is not in a valid format.
digest.go:121
↓ 8 callers
Function
assertEqualShort
(t *testing.T, actual, expected string)
digestset/set_test.go:208
↓ 6 callers
Function
createDigests
(count int)
digestset/set_test.go:248
↓ 5 callers
Function
NewSet
NewSet creates an empty set of digests which may have digests added.
digestset/set.go:54
↓ 5 callers
Method
String
()
digest.go:145
↓ 5 callers
Function
assertEqualDigests
(t *testing.T, d1, d2 digest.Digest)
digestset/set_test.go:28
↓ 4 callers
Method
Digest
provides direct access to underlying hash instance.
digester.go:25
↓ 4 callers
Method
Encoded
Encoded returns the encoded portion of the digest. This will panic if the underlying digest is not in a valid format.
digest.go:136
↓ 4 callers
Method
Hash
()
digester.go:24
↓ 3 callers
Method
Available
Available returns true if the digest type is available for use. If this returns false, Digester and Hash will return nil.
algorithm.go:67
↓ 3 callers
Method
FromBytes
FromBytes digests the input and returns a Digest.
algorithm.go:158
↓ 3 callers
Method
Hex
Hex is deprecated. Please use Digest.Encoded.
digest.go:141
↓ 3 callers
Function
NewDigestFromEncoded
NewDigestFromEncoded returns a Digest from alg and the encoded digest.
digest.go:58
↓ 3 callers
Function
ShortCodeTable
ShortCodeTable returns a map of Digest to unique short codes. The length represents the minimum value, the maximum length may be the entire value of d
digestset/set.go:203
↓ 3 callers
Method
Validate
Validate checks that the contents of d is a valid digest, returning an error if not.
digest.go:103
↓ 3 callers
Method
Write
(p []byte)
verifiers.go:40
↓ 3 callers
Function
benchAddNTable
(b *testing.B, n int)
digestset/set_test.go:261
↓ 3 callers
Function
benchLookupNTable
(b *testing.B, n int, shortLen int)
digestset/set_test.go:277
↓ 3 callers
Function
benchRemoveNTable
(b *testing.B, n int)
digestset/set_test.go:301
↓ 3 callers
Function
benchShortCodeNTable
(b *testing.B, n int, shortLen int)
digestset/set_test.go:324
↓ 3 callers
Function
checkShortMatch
checkShortMatch checks whether two digests match as either whole values or short values. This function does not test equality, rather whether the seco
digestset/set.go:64
↓ 2 callers
Method
Digester
Digester returns a new digester for the specified algorithm. If the algorithm does not have a digester implementation, nil will be returned. This can
algorithm.go:109
↓ 2 callers
Function
FromBytes
FromBytes digests the input and returns a Digest.
digest.go:92
↓ 2 callers
Method
FromReader
FromReader returns the digest of the reader using the algorithm.
algorithm.go:147
↓ 2 callers
Method
FromString
FromString digests the string input and returns a Digest.
algorithm.go:174
↓ 2 callers
Function
NewDigest
NewDigest returns a Digest from alg and a hash.Hash object.
digest.go:40
↓ 2 callers
Function
Parse
Parse parses s and returns the validated digest object. An error will be returned if the format is invalid.
digest.go:81
↓ 2 callers
Method
Remove
Remove removes the given digest from the set. An err will be returned if the given digest is invalid. If the digest does not exist in the set, this op
digestset/set.go:159
↓ 2 callers
Method
Verifier
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.
digest.go:127
↓ 2 callers
Method
sepIndex
()
digest.go:149
↓ 1 callers
Method
All
All returns all the digests in the set
digestset/set.go:187
↓ 1 callers
Method
Encode
Encode encodes the raw bytes of a digest, typically from a hash.Hash, into the encoded portion of the digest.
algorithm.go:140
↓ 1 callers
Function
FromReader
FromReader consumes the content of rd until io.EOF, returning canonical digest.
digest.go:87
↓ 1 callers
Function
FromString
FromString digests the input and returns a Digest.
digest.go:97
↓ 1 callers
Method
Hash
Hash returns a new hash as used by the algorithm. If not available, the method will panic. Check Algorithm.Available() before calling.
algorithm.go:118
↓ 1 callers
Function
NewDigestFromBytes
NewDigestFromBytes returns a new digest from the byte contents of p. Typically, this can come from hash.Hash.Sum(...) or xxx.SumXXX(...) functions. Th
digest.go:48
↓ 1 callers
Method
Size
Size returns number of bytes returned by the hash.
algorithm.go:82
↓ 1 callers
Method
Verified
Verified will return true if the content written to Verifier matches the digest.
verifiers.go:32
Function
BenchmarkAdd10
(b *testing.B)
digestset/set_test.go:342
Function
BenchmarkAdd100
(b *testing.B)
digestset/set_test.go:346
Function
BenchmarkAdd1000
(b *testing.B)
digestset/set_test.go:350
Function
BenchmarkLookup10
(b *testing.B)
digestset/set_test.go:366
Function
BenchmarkLookup100
(b *testing.B)
digestset/set_test.go:370
Function
BenchmarkLookup1000
(b *testing.B)
digestset/set_test.go:374
Function
BenchmarkRemove10
(b *testing.B)
digestset/set_test.go:354
Function
BenchmarkRemove100
(b *testing.B)
digestset/set_test.go:358
Function
BenchmarkRemove1000
(b *testing.B)
digestset/set_test.go:362
Function
BenchmarkShortCode10
(b *testing.B)
digestset/set_test.go:378
Function
BenchmarkShortCode100
(b *testing.B)
digestset/set_test.go:381
Function
BenchmarkShortCode1000
(b *testing.B)
digestset/set_test.go:384
Method
Digest
()
digester.go:38
Method
Hash
()
digester.go:34
Method
Len
()
digestset/set.go:249
Method
Less
(i, j int)
digestset/set.go:253
Function
NewDigestFromHex
NewDigestFromHex is deprecated. Please use NewDigestFromEncoded.
digest.go:53
Method
Set
Set implemented to allow use of Algorithm as a command line flag.
algorithm.go:91
Method
String
()
algorithm.go:77
Method
Swap
(i, j int)
digestset/set.go:260
Function
TestAddDuplication
(t *testing.T)
digestset/set_test.go:108
Function
TestAll
(t *testing.T)
digestset/set_test.go:178
Function
TestDigestVerifier
(t *testing.T)
verifiers_test.go:26
Function
TestFlagInterface
(t *testing.T)
algorithm_test.go:29
Function
TestFroms
(t *testing.T)
algorithm_test.go:79
Function
TestLookup
(t *testing.T)
digestset/set_test.go:34
Function
TestParseDigest
(t *testing.T)
digest_test.go:22
Function
TestRemove
(t *testing.T)
digestset/set_test.go:148
Function
TestShortCodeTable
(t *testing.T)
digestset/set_test.go:214
Function
TestVerifierUnsupportedDigest
TestVerifierUnsupportedDigest ensures that unsupported digest validation is flowing through verifier creation.
verifiers_test.go:42
Method
Validate
Validate validates the encoded portion string
algorithm.go:179
Method
Verified
()
verifiers.go:44