带有8字节输出块的哈希函数(md5?crc?) [英] Hash function with 8 byte output block (md5? crc?)

查看:163
本文介绍了带有8字节输出块的哈希函数(md5?crc?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您是否知道可以使用c#实现的任何哈希函数来生成16个标准char 输出?

MD5输出16个字节,我只想使用AZaz09字符.

使用26 + 10个字母数字字符,碰撞概率为1/(36 ^(16/2))= 1/2.821109907456 x 10 ^ 12

使用字节到十六进制的转换应为16个字符^(16/2)= 4.294967296 x 10 ^ 9

这真的让我满意.但我无法在Google上找到它.
您可以帮我吗?

Do you know any hash function, with an implementation in c#, that I can use to produce a 16 standard char output?

MD5 outputs 16 bytes, I want to use just AZaz09 chars.

Using 26+10 alphanumeric char the collision probability is 1/(36^(16/2)) = 1/ 2.821109907456 x 10^12

Using an byte to hex conversion it should be 16 chars ^ (16/2) = 4.294967296 x 10^9

It really satisfies me. But I cannot found it on google.
Can you help me?

推荐答案

MD5根据您的要求返回16个字符.但是现在没有安全专家建议使用MD5-您应该使用16个以上的字符-检查SHA.

MD5在.NET框架-MD5类中实现-例如,请检查此链接
http://msdn.microsoft.com/en-us/library/system. security.cryptography.md5.aspx [ ^ ]

或者,如果您想从头开始-这是使用C#实现MD5的源代码
http://s.faraz.mahmood.googlepages.com/MD5.zi [ ^ ]
MD5 returns 16 characters as you requested. But now no security expert advises the use of MD5 - you should use more than 16 chars - check SHA.

MD5 is implemented in .NET framework - the MD5 class - for an example check this link
http://msdn.microsoft.com/en-us/library/system.security.cryptography.md5.aspx[^]

Or if you want it from scratch - here is the source code of MD5 implementation using C#
http://s.faraz.mahmood.googlepages.com/MD5.zi[^]


这篇关于带有8字节输出块的哈希函数(md5?crc?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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