bcryptHash returns the bcrypt hash of the given password.
(b *testing.B, password []byte)
| 371 | |
| 372 | // bcryptHash returns the bcrypt hash of the given password. |
| 373 | func 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. |
| 380 | type hashAndPassword struct { |
no outgoing calls
no test coverage detected