字符串的唯一哈希 [英] unique hash of string

查看:145
本文介绍了字符串的唯一哈希的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个任意长度String的唯一哈希(16个字符长)。有没有一个良好的库实现MD5或SHA-1为C ++,我可以实现这一点? (可能是如何使用它的示例)

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.

这篇关于字符串的唯一哈希的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆