MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / secureCompare

Function secureCompare

server-source-code/internal/context/middleware.go:16–18  ·  view source on GitHub ↗

secureCompare performs a constant-time comparison to prevent timing attacks on secrets.

(a, b string)

Source from the content-addressed store, hash-verified

14
15// secureCompare performs a constant-time comparison to prevent timing attacks on secrets.
16func secureCompare(a, b string) bool {
17 return subtle.ConstantTimeCompare([]byte(a), []byte(b)) == 1
18}
19
20// RegistryReloadHandler returns a handler for POST /api/v1/internal/reload-registry-map.
21// Triggers an immediate refresh of the registry cache. Used by the provisioner

Callers 2

RegistryReloadHandlerFunction · 0.85
ReloadHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected