Where to find Open Source Implementations of Hashing/Crypting Algorithms(header files)
I am trying to find open source implementations of Hashing/Crypting(is it HMAC?) algorithms such as SHA256, SHA512, MD5. This is in C++/C
I know of things like Crypto++ but I find them really difficult to include in my projects because they are in DLL's, ie, I really just dont know how to include & use them in my projects &开发者_运维技巧 also I think they make my projects too large unecessarily.
I once found an open source SHA256 header file & .cpp implementation(on google) but I cannot refind it on google.
Anyone know of any or maybe a website with a whole lot of them?
Use Google Code Search instead of Google. It'll search open source repositories for whatever you need.
Here is a search for MD5 or SHA implementations in C or C++.
I think you still want Crypto++, you seem to have some misconceptions about it.
I know of things like Crypto++ but I find them really difficult to include in my projects because they are in DLL's
You can build Crypto as a static lib. Are you on Windows? The .vcproj file includes a configuration for static building. If you are on Linux, the Makefile also has this.
I really just dont know how to include & use them in my projects
If you build the library statically then usage is very simple. Just add the Crypto++ directory as an include path to your compiler configuration, and add the .lib or .a (depending on your platform) to your linker's configuration.
also I think they make my projects too large unecessarily.
This is another misconception. If you build the Crypto++ static library, then only the portions of the library that you use will be included in your executable. So while the static library can be huge, if you just use the MD5 algorithm, only the MD5 code will be included in your app.
Give Crypto++ another try, it's well worth it!
精彩评论