MCPcopy
hub / github.com/jackc/pgx / computeHMAC

Function computeHMAC

pgconn/auth_scram.go:347–351  ·  view source on GitHub ↗
(key, msg []byte)

Source from the content-addressed store, hash-verified

345}
346
347func computeHMAC(key, msg []byte) []byte {
348 mac := hmac.New(sha256.New, key)
349 mac.Write(msg)
350 return mac.Sum(nil)
351}
352
353func computeClientProof(saltedPassword, authMessage []byte) []byte {
354 clientKey := computeHMAC(saltedPassword, []byte("Client Key"))

Callers 2

computeClientProofFunction · 0.85
computeServerSignatureFunction · 0.85

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected