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

Adding entropy collectors for mouse/keyboard should not depend on jQuery #522

Open
dlongley opened this issue Jul 7, 2017 · 0 comments
Open
Assignees

Comments

@dlongley
Copy link
Member

@dlongley dlongley commented Jul 7, 2017

See:

forge/lib/random.js

Lines 158 to 171 in 4a046fc

// add mouse and keyboard collectors if jquery is available
if(jQuery) {
// set up mouse entropy capture
jQuery().mousemove(function(e) {
// add mouse coords
_ctx.collectInt(e.clientX, 16);
_ctx.collectInt(e.clientY, 16);
});
// set up keyboard entropy capture
jQuery().keypress(function(e) {
_ctx.collectInt(e.charCode, 8);
});
}

We should add these if we're in the browser -- and use the native browser JS to make it happen.

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.