Secure password hashing for Lua
Log | Files | Refs

commit 8b14c940874cad6b6538e5850f8c6d131e032f97
parent 5357c7ea6c456b6ecb998814f870d2897fb0e763
Author: Michael Savage <>
Date:   Tue, 16 Dec 2014 13:22:00 +0000

Add support for 2y hashes

OpenBSD's bcrypt does not support 2y hashes. However, I believe that 2b
and 2y hashes are equivalent and the crypt_blowfish treats them in the
same manner.

Also see #6.

compat/bcrypt/bcrypt.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/compat/bcrypt/bcrypt.c b/compat/bcrypt/bcrypt.c @@ -114,6 +114,7 @@ bcrypt_hashpass(const char *key, const char *salt, char *encrypted, key_len = (u_int8_t)(strlen(key) + 1); break; case 'b': + case 'y': /* strlen() returns a size_t, but the function calls * below result in implicit casts to a narrower integer * type, so cap key_len at the actual maximum supported