MCPcopy Create free account
hub / github.com/pion/dtls / TestHashAlgorithm_StringRoundtrip

Function TestHashAlgorithm_StringRoundtrip

pkg/crypto/hash/hash_test.go:13–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11)
12
13func TestHashAlgorithm_StringRoundtrip(t *testing.T) {
14 for algo := range Algorithms() {
15 if algo == Ed25519 || algo == None {
16 continue
17 }
18
19 str := algo.String()
20 hash1 := algo.CryptoHash()
21 hash2, err := fingerprint.HashFromString(str)
22 assert.NoError(t, err)
23 assert.Equal(t, hash1, hash2)
24 }
25}
26
27func TestExtractHashFromPSS(t *testing.T) {
28 tests := []struct {

Callers

nothing calls this directly

Calls 5

HashFromStringFunction · 0.92
CryptoHashMethod · 0.80
EqualMethod · 0.80
AlgorithmsFunction · 0.70
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…