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

Function bcryptHash

auth/password_hash_test.go:373–377  ·  view source on GitHub ↗

bcryptHash returns the bcrypt hash of the given password.

(b *testing.B, password []byte)

Source from the content-addressed store, hash-verified

371
372// bcryptHash returns the bcrypt hash of the given password.
373func bcryptHash(b *testing.B, password []byte) []byte {
374 hash, err := bcrypt.GenerateFromPassword(password, DefaultBcryptCost)
375 require.NoError(b, err)
376 return hash
377}
378
379// hashAndPassword represents the password hash pair.
380type hashAndPassword struct {

Calls

no outgoing calls

Tested by

no test coverage detected