lua-bcrypt

Secure password hashing for Lua
Log | Files | Refs

commit 2a983ead15a1f0cda33256c0b470d0d02328e8c5
parent 11506b0cb871271d7c82fe62edf8cca237b040f2
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sat, 17 Dec 2011 11:09:22 +0000

Replace useless test

Diffstat:
tests.lua | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests.lua b/tests.lua @@ -5,7 +5,9 @@ assert( salt:len() == 29 ) local digest = bcrypt.digest( salt, salt ) assert( bcrypt.verify( salt, digest ) ) -assert( not bcrypt.verify( salt:gsub( "^%$", "#" ), digest ) ) +assert( not bcrypt.verify( salt:gsub( "(.)$", function( ch ) + return string.char( ( ch:byte() + 1 ) % 255 ) +end ), digest ) ) local tests = { {