开发者

unique hash of string

开发者 https://www.devze.com 2022-12-22 18:15 出处:网络
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

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

精彩评论

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