bcrypt.js icon indicating copy to clipboard operation
bcrypt.js copied to clipboard

Exact password length in Javascript comparison

Open lucasMontenegro opened this issue 7 years ago • 0 comments

In the README you say that the bcrypt algorithm only works with passwords that are up to 72 bytes long. And in this stack overflow question I read that in JS a string is a finite ordered sequence of zero or more 16-bit unsigned integer values. If those 72 bytes are 8-bit long does this mean that in my code I have to check password.length > 36? Bcryptjs doesn't seem to care.

lucasMontenegro avatar Jan 19 '19 01:01 lucasMontenegro