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

add timingSafeEqual #156

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

add timingSafeEqual #156

wants to merge 6 commits into from

Conversation

calvinmetcalf
Copy link
Contributor

No description provided.

@jprichardson
Copy link
Member

Thanks for being quick on the trigger here @calvinmetcalf!

@calvinmetcalf
Copy link
Contributor Author

these errrors have nothing to do with this, but just flakiness from saucelabs

@dcousens
Copy link
Member

What is buffer-shims?

@calvinmetcalf
Copy link
Contributor Author

its for using the new buffer api the Buffer.alloc and Buffer.from stuff

@calvinmetcalf
Copy link
Contributor Author

fixed and rebased

Copy link
Member

@dcousens dcousens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@dcousens dcousens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, check test feedback


t.throws(function () {
timingSafeEqual(Buffer.from([1, 2, 3]), Buffer.from([1, 2]))
}, 'should throw when given buffers with different lengths')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t.throws(fn, expected, msg)

You are only doing

t.throws(fn, msg)

You should check what exception is throwing.

@calvinmetcalf
Copy link
Contributor Author

from what I can tell, we have a problem with the saucelabs setup

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 this pull request may close these issues.

3 participants