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

when attempting to specify a salt with $2b$ bcrypt throws an error #349

Closed
craigxgibbons opened this issue Sep 23, 2015 · 9 comments

Comments

@craigxgibbons
Copy link

commented Sep 23, 2015

According to the Bcrypt page on Wikipedia, $2a$, $2b$ and $2y$ are all valid.

@defunctzombie

This comment has been minimized.

Copy link
Collaborator

commented Sep 23, 2015

iirc the 2a ab 2b are deprecated. This library only supports the 2y prefix.

@craigxgibbons

This comment has been minimized.

Copy link
Author

commented Sep 23, 2015

Looking at the code it seems the library only supports the 2a prefix.
https://github.com/ncb000gt/node.bcrypt.js/blob/master/src/bcrypt.cc#L136

I did find some reference to 2y being the one to go for going forward but there are still plenty of 2a & 2b around, I think it would still be of value to support those for my 2c (pun intended).

@defunctzombie

This comment has been minimized.

Copy link
Collaborator

commented Sep 23, 2015

If you make a PR I would review but otherwise this is unlikely to happen.
Most users of the library won't care.

On Wednesday, September 23, 2015, craigxgibbons notifications@github.com
wrote:

Looking at the code it seems the library only supports the 2a prefix.
https://github.com/ncb000gt/node.bcrypt.js/blob/master/src/bcrypt.cc#L136

I did find some reference to 2y being the one to go for going forward but
there are still plenty of 2a & 2b around, I think it would still be of
value to support those for my 2c.


Reply to this email directly or view it on GitHub
#349 (comment)
.

@craigxgibbons

This comment has been minimized.

Copy link
Author

commented Sep 23, 2015

Ok fair enough, I'm not a C developer but I'll try put something together. Thanks

@diversario

This comment has been minimized.

Copy link

commented Nov 21, 2015

All hashes generated with this library are $2a prefixed as far as I can tell.

@diversario

This comment has been minimized.

Copy link

commented Nov 25, 2015

➜ npm ls bcrypt
└── bcrypt@0.8.5
➜ node
> var b = require('bcrypt')
undefined
> b.hashSync('123', b.genSaltSync())
'$2a$10$vC.XMbLbIA1XqaD2E9pyK.GWjrs7MikKni3jYMgFt10Qzd.8vay/K'

So, am I using it wrong? Is it supposed to generate $2y hashes?

@julien-f

This comment has been minimized.

Copy link

commented Feb 5, 2016

Same here, I am getting $2a$ prefixes instead of $2y.

@defunctzombie Is it normal?

@defunctzombie

This comment has been minimized.

Copy link
Collaborator

commented Feb 5, 2016

Take a look at this issue: #175

@julien-f

This comment has been minimized.

Copy link

commented Feb 5, 2016

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.