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

Function Sha1HashString

base/util.go:1294–1299  ·  view source on GitHub ↗
(str string, salt string)

Source from the content-addressed store, hash-verified

1292}
1293
1294func Sha1HashString(str string, salt string) string {
1295 h := sha1.New()
1296 h.Write([]byte(salt + str))
1297 hashedKey := h.Sum(nil)
1298 return fmt.Sprintf("%x", hashedKey)
1299}
1300
1301// KVPair represents a single KV pair to be used in InjectJSONProperties
1302type KVPair struct {

Callers 3

HashRedactMethod · 0.92
HashRedactMethod · 0.92
SerializeIfLongerFunction · 0.85

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected