Skip to content

Commit

Permalink
test(pbkdf2): verify padded encoding (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
muhlemmer authored Sep 11, 2024
1 parent 0a5641b commit fc11e71
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pbkdf2/pbkdf2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,17 @@ func TestHasher_Verify(t *testing.T) {
},
want: verifier.OK,
},
{
name: "sha256, padded, ok",
h: Hasher{
p: testParamsSha256,
},
args: args{
tv.Pbkdf2Sha256StdEncodedPadding,
tv.Password,
},
want: verifier.OK,
},
{
name: "sha512, ok",
h: Hasher{
Expand Down Expand Up @@ -499,6 +510,14 @@ func TestVerify(t *testing.T) {
},
want: verifier.OK,
},
{
name: "sha256, padded, ok",
args: args{
tv.Pbkdf2Sha256StdEncodedPadding,
tv.Password,
},
want: verifier.OK,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit fc11e71

Please sign in to comment.