secureCompare performs a constant-time comparison to prevent timing attacks on secrets.
(a, b string)
| 14 | |
| 15 | // secureCompare performs a constant-time comparison to prevent timing attacks on secrets. |
| 16 | func 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 |
no outgoing calls
no test coverage detected