mirror of
https://github.com/rclone/rclone.git
synced 2025-12-26 05:03:43 +00:00
vendor: update all dependencies
This commit is contained in:
17
vendor/golang.org/x/crypto/bcrypt/bcrypt_test.go
generated
vendored
17
vendor/golang.org/x/crypto/bcrypt/bcrypt_test.go
generated
vendored
@@ -224,3 +224,20 @@ func BenchmarkGeneration(b *testing.B) {
|
||||
GenerateFromPassword(passwd, 10)
|
||||
}
|
||||
}
|
||||
|
||||
// See Issue https://github.com/golang/go/issues/20425.
|
||||
func TestNoSideEffectsFromCompare(t *testing.T) {
|
||||
source := []byte("passw0rd123456")
|
||||
password := source[:len(source)-6]
|
||||
token := source[len(source)-6:]
|
||||
want := make([]byte, len(source))
|
||||
copy(want, source)
|
||||
|
||||
wantHash := []byte("$2a$10$LK9XRuhNxHHCvjX3tdkRKei1QiCDUKrJRhZv7WWZPuQGRUM92rOUa")
|
||||
_ = CompareHashAndPassword(wantHash, password)
|
||||
|
||||
got := bytes.Join([][]byte{password, token}, []byte(""))
|
||||
if !bytes.Equal(got, want) {
|
||||
t.Errorf("got=%q want=%q", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user