rg3 / libbcrypt

bcrypt password hash C library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getting Assertion failed: ret == 0, when using example from repository of bcrypt.c file

axano opened this issue · comments

Using gcc in netbeans on windows 10 to make the .a file,
I then link the .a file to a test project, and include the header file in it,
It compiles well, and executes but when calling

ret = bcrypt_gensalt(12, salt);
assert(ret == 0);

I get ret "Assertion failed: ret == 0, file main.c, line 20"

is this a bug or has it to do with the linking process

I'm guessing the library is unable to open /dev/urandom while running on Windows. As a matter of fact, I was unaware the library could be compiled on Windows. It's implemented for Unix-like systems. You should be able to verify the problem by checking the value of "ret".

the value in return is indeed ZERO, so I guess this issue should be closed. Thanks for the info.