Skip to content

Commit

Permalink
fix: Use named hash algorithm in PBKDF2
Browse files Browse the repository at this point in the history
Should help with an issue in node-webcrypto-ossl,
see PeculiarVentures/webcrypto-core#27
  • Loading branch information
franky47 committed May 10, 2020
1 parent 99567d3 commit 4869291
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/primitives/pbkdf2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export async function pbkdf2DeriveBytes(
name: 'PBKDF2',
salt,
iterations: rounds,
hash
hash: {
name: hash
}
},
key,
length << 3 // bytes -> bits
Expand Down

0 comments on commit 4869291

Please sign in to comment.