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

crypto.timingSafeEqual missing #46

Open
MartijnFLC opened this issue Feb 1, 2021 · 0 comments
Open

crypto.timingSafeEqual missing #46

MartijnFLC opened this issue Feb 1, 2021 · 0 comments

Comments

@MartijnFLC
Copy link

When I try to load the following example found in the documentation, there seems to be a missing function.

// Check that we don't need to rotate hashes
 let stale = await sodium.crypto_pwhash_str_needs_rehash(
     pwhash,
     sodium.CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE,
     sodium.CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE
 );

The code to generate the hash itself works perfectly though

It throws the following error: crypto.timingSafeEqual is not a function (sodium-plus.js:2035:24)
I am using version 0.9.0 from unpkg

I am using the browser version and insert the library like this:
<script src="~/lib/sodium-plus/dist/sodium-plus.js"></script>

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