MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / sha256Digest

Function sha256Digest

db/attachment.go:458–462  ·  view source on GitHub ↗

sha256Digest returns sha256 digest of the input bytes encoded by using the standard base64 encoding, as defined in RFC 4648.

(key []byte)

Source from the content-addressed store, hash-verified

456// sha256Digest returns sha256 digest of the input bytes encoded
457// by using the standard base64 encoding, as defined in RFC 4648.
458func sha256Digest(key []byte) string {
459 digester := sha256.New()
460 digester.Write(key)
461 return base64.StdEncoding.EncodeToString(digester.Sum(nil))
462}

Callers 1

MakeAttachmentKeyFunction · 0.85

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected