MCPcopy
hub / github.com/pocketbase/pocketbase / Equal

Function Equal

tools/security/crypto.go:60–62  ·  view source on GitHub ↗

Equal compares two hash strings for equality without leaking timing information.

(hash1 string, hash2 string)

Source from the content-addressed store, hash-verified

58
59// Equal compares two hash strings for equality without leaking timing information.
60func Equal(hash1 string, hash2 string) bool {
61 return subtle.ConstantTimeCompare([]byte(hash1), []byte(hash2)) == 1
62}

Callers 2

TestEqualFunction · 0.92
parseIdTokenMethod · 0.92

Calls

no outgoing calls

Tested by 1

TestEqualFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…