commit cb4b9956f6a38b659d3b176f04ffdb57ed331e5e
parent 5d9ad87c1564e1e8837f732d35d54c0381f82451
Author: Michael Savage <mikejsavage@gmail.com>
Date: Mon, 5 May 2014 14:31:44 +0100
Extra bcrypt.random tests
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/tests.lua b/tests.lua
@@ -18,6 +18,10 @@ end ), digest ) )
-- test we can't use a bad entropy source
local ok = pcall( bcrypt.random, "/dev/null" )
assert( not ok )
+local ok = pcall( bcrypt.random, "/doesnotexist" )
+assert( not ok )
+local ok = pcall( bcrypt.random, "/etc/passwd" )
+assert( not ok )
-- some test inputs, mostly taken from john the ripper
local tests = {