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

move from buffer-equal-constant-time to timingSafeEqual #46

Open
niziak opened this issue Jan 28, 2023 · 2 comments · May be fixed by #49
Open

move from buffer-equal-constant-time to timingSafeEqual #46

niziak opened this issue Jan 28, 2023 · 2 comments · May be fixed by #49

Comments

@niziak
Copy link

niziak commented Jan 28, 2023

Hi.
Reason of this proposal is described here: Shinobi #452. Please also see note here: Publish deprecation notice #6

@thaisfaria
Copy link

This is causing a failed build on my production project due to multiple libraries depending on jsonwebtoken or jws, that ultimately depend on this library.

@jimmywarting
Copy link

Would prefer a NodeJS dependency free solution that dose not depend on node:crypto or node:buffer in the hope of one day being better cross compatible with other env. and instead operates on Uint8Array

So i would just rather inline the solution and build a more generic solution that works on any typed array.

function timingEq(a, b) {
  if (a.length !== b.length) return false

  let c = 0
  for (let i = 0, len = a.length; i < len; i++) c |= a[i] ^ b[i]
  return !c
}

@jimmywarting jimmywarting linked a pull request Sep 15, 2023 that will close this issue
4 tasks
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

Successfully merging a pull request may close this issue.

3 participants