-
Notifications
You must be signed in to change notification settings - Fork 270
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
fix#73: replaced .push with .concat as it is faster #88
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this PR complete and tested? I see several issues:
- salt.concat is used but in line 85 'salt.join' is used/returned. When salt.concat is used salt.join shouldn't be nessecary.
-
$2a$ is used in genSaltSync, but in tests it is tested for$2b$
@Ruffio Hi, i changed it into tests because salt2 is generated from bindings.genSalt instead of bcrypt.genSlat. Also the test would fail without my changes too. I checked it's 2b there. Am i missing something here? Will fix the other one, yes I had that way too you are right. I am new to open source. Thanks for feedback :) |
So the tests are failing in master too. because of binding.genSaltSync defaults to 'b' minor. https://www.dropbox.com/s/png23w5x5214zlb/Screenshot%202018-08-25%2017.37.33.png?dl=0 A simple fix would be to pass the second parameter: 'a' as a minor. https://www.dropbox.com/s/8dnfks09hyye1sj/Screenshot%202018-08-25%2017.39.13.png?dl=0 Everyone happy :) |
@dcodeIO what do you think? |
1 similar comment
@dcodeIO what do you think? |
I'm not sure that contact actually is faster anyway, based on these articles and tests I would say it is actually the other way around. https://codeburst.io/jsnoob-push-vs-concat-basics-and-performance-comparison-7a4b55242fa9 |
No description provided.