Hi,
I’m using workers to generate and compare hashed values. The original values are hashed with python django using PBKDF2. The code is based on this post:
https://community.cloudflare.com/t/web-crypto-api-importkey-or-derivekey-not-generating-correctly/30836
I’ve ran into an issue with deriveKey.
const dkey = await crypto.subtle.deriveKey({
name: 'PBKDF2',
salt,
iterations,
hash
},
baseKey, {
name: mode,
hash: {
name: hash
},
},
true, ['sign', 'verify'],
)
When the iterations are > 100,000, it throws a DOMException. My django hashes have iterations at 260,000. The most recent version of django hashes with 720,000 iterations.
I’ve run the code in jsfiddle with no issues. Is there an iteration limit in the worker platform? Am I doing this wrong?