antelle / argon2-browser

Argon2 library compiled for browser runtime
https://antelle.net/argon2-browser
MIT License
362 stars 78 forks source link

Memory cost is too small #97

Open chengdonglin opened 2 months ago

chengdonglin commented 2 months ago

java code the memory set memory 12, I use the some code i web, It tell me memory cost is too small, now we can not change the momory the big, how can I fix the propblem?hehe is code,

export async function argonEncrypt(value) { const keyData = new TextEncoder().encode(key) const res= await argon2.hash({ pass: value, salt: value, time: 20, mem: 12, type: argon2.ArgonType.Argon2id, hashLen:32, parallelism: 2 }) return Base64.fromUint8Array(res.hash) }

antelle commented 2 months ago

I guess it’s the limitation of webassembly