unique hash of string

2019-07-31 03:51发布

I want to create a unique hash (16 chars long) of an arbitrary length String. Is there a good library that implements MD5 or SHA-1 for C++ with which I can achieve this? (and possibly an example of how to use it)

标签: c++ md5 hash sha1
3条回答
乱世女痞
2楼-- · 2019-07-31 04:36

You need the openssl library. It has implementations of the standard crypto hashes for this purpose.

查看更多
We Are One
3楼-- · 2019-07-31 04:37

The Pigeonhole Principle explains why what you ask is impossible regarding uniqueness.

查看更多
不美不萌又怎样
4楼-- · 2019-07-31 04:40

nss provides a number of hash and cryptographic algorithms and has a more liberal license than OpenSSL.

查看更多
登录 后发表回答