Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MD5 and SHA1 C++ hashing library

Tags:

c++

hash

md5

sha1

I'm trying to find a good (and well documented) hashing library to use with my C++ program, I only need to generate two hashes from a string.

I've tried with crypto++ and mhash and I didn't manage to make them work, also with http://www.zedwood.com/article/121/cpp-md5-function

I would be glad if this library is cross-platform.

like image 434
0x77D Avatar asked Jan 13 '11 09:01

0x77D


People also ask

What is SHA1 and MD5?

MD5 stands for Message Digest. While SHA1 stands for Secure Hash Algorithm. 2. MD5 can have 128 bits length of message digest. Whereas SHA1 can have 160 bits length of message digest.

What is a hashing library?

The DPDK provides a Hash Library for creating hash table for fast lookup. The hash table is a data structure optimized for searching through a set of entries that are each identified by a unique key.

What is MD5 or SHA-1 commonly used for in cryptography?

Message Digest Algorithm 5 (MD5) is a cryptographic hash algorithm that can be used to create a 128-bit string value from an arbitrary length string. Although there has been insecurities identified with MD5, it is still widely used. MD5 is most commonly used to verify the integrity of files.

Why are MD5 and SHA-1 no longer the preferred algorithm for hash values?

It was designed for use in cryptography, but vulnerabilities were discovered over the course of time, so it is no longer recommended for that purpose. However, it is still used for database partitioning and computing checksums to validate files transfers.


1 Answers

Try this open source library http://hashlib2plus.sourceforge.net/

like image 70
programmer Avatar answered Oct 17 '22 03:10

programmer