simple bcrypt library for C
bcrypt
Solution
Your C options for bcrypt seem to be:
In OpenBSD: https://github.com/openbsd/src/blob/master/lib/libc/crypt/bcrypt.c
In OpenWall: http://openwall.com/crypt/
The C implementations seem to be pretty straightforward to use. The OpenBSD version looks like this:
char *bcrypt(const char *key, const char *salt);
char *bcrypt_gensalt(u_int8_t log_rounds);
P.S. Consider scrypt for new code, if you are not restricted to using bcrypt only due to backward compatibility,
Problem
I'm looking for a simple to use cross-platform bcrypt library for C. I've searched around a couple places but nothing seems to compares to the ease of use of: http://bcrypt.codeplex.com/SourceControl/changeset/view/1eef0262901c#BCrypt.Net.Test%2fTestBCrypt.cs Why are all the C implementations of this a nightmare compared to this .NET lib? Basically 2 functions is what I'm looking for. 1) Generate salt (return a string) 2) Hash string using a given salt & pw (return a string)