scrypt C library
I'm currently developing a C app in which I'll need to hash user's passwords. I know scrypt is currently one of the best methods to "hash" passwords (memory-bound, slow), but I can't seem to find a simple cross-pla开发者_StackOverflow社区tform C library that would do it for me.
And, since I'm neither a C expert or a cryptography/hashing expert, I'm afraid doing it myself will induce some obvious flaws in the system (it's easy to get these things wrong).
So, is there a C library that can do that, or, if not, other libraries that would implement similar solutions ? (bcrypt would work, although not as good as scrypt, ...)
Google says yes: scrypt_1.1.6.orig.tar.gz
(the relevant files seem to be in the lib
subfolder)
this is an open source cross-platform library that has implementations of various crypto algorithms and hash functions from scratch.
You can see it here: https://github.com/kala13x/libxutils
In the examples
directory, there is tool with name xcrypt
which you can use as an example to see how lib functions are used. It's also a great tool for encrypting and decrypting files and text in CLI.
精彩评论