MCPcopy Create free account
hub / github.com/cockroachdb/redact / EnableHashing

Function EnableHashing

api.go:207–209  ·  view source on GitHub ↗

EnableHashing enables hash-based redaction with an optional salt. Hash markers (‹†value›) will be replaced with hashes instead of being fully redacted. When salt is nil, hash markers use plain SHA-256. When salt is provided, hash markers use HMAC-SHA256 for better security.

(salt []byte)

Source from the content-addressed store, hash-verified

205// When salt is nil, hash markers use plain SHA-256.
206// When salt is provided, hash markers use HMAC-SHA256 for better security.
207func EnableHashing(salt []byte) {
208 m.EnableHashing(salt)
209}
210
211// DisableHashing disables hash-based redaction.
212// Hash markers will be fully redacted instead of being replaced with hashes.

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…