开发者

unique hash of string

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)


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


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜