Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is saltLength broken? Examples attached #441

Open
xgiovio opened this issue Dec 22, 2024 · 0 comments
Open

Is saltLength broken? Examples attached #441

xgiovio opened this issue Dec 22, 2024 · 0 comments

Comments

@xgiovio
Copy link

xgiovio commented Dec 22, 2024

async function argon2(password){ try{ return await a2.hash(password.normalize("NFD"), { type: a2.argon2id, //hybrid memoryCost: 2 ** 16, //64MB per thread hashLength: 32, timeCost:10, parallelism:4, saltLength:32, raw: false }); }catch(err){ return null; } }

output has always 16 bytes random salt:

$argon2id$v=19$m=65536,t=10,p=4$oJZM5QTIRFsTy7tJgcrDHQ$JUtK3qlr7MmQZ54dSiPJhxJtux+u7W+DTZ3pvblyGzE

it however gives the correct output if i input {salt:randomValuesHere} in the object.

I would like to understand:

  1. Why the example above is not working correctly?
  2. What happens it i supply salt and saltLenght at the same? And what if saltLength is different in specified size from the salt input

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant