hash加密全家族

| |
2007/11/17 15:05 ArthurXF
  我们曾经或多或少都会碰到过MD5密码文件校验之类的。知道MD5是一种不可逆的加密算法。其实MD5只是hash(哈希)中的一种运算规则。那么除了MD5还有多少种呢?请看下面:
引用
print_r(hash_algos());
?>
Array
(
   [0] => md4
   [1] => md5
   [2] => sha1
   [3] => sha256
   [4] => sha384
   [5] => sha512
   [6] => ripemd128
   [7] => ripemd160
   [8] => whirlpool
   [9] => tiger128,3
   [10] => tiger160,3
   [11] => tiger192,3
   [12] => tiger128,4
   [13] => tiger160,4
   [14] => tiger192,4
   [15] => snefru
   [16] => gost
   [17] => adler32
   [18] => crc32
   [19] => crc32b
   [20] => haval128,3
   [21] => haval160,3
   [22] => haval192,3
   [23] => haval224,3
   [24] => haval256,3
   [25] => haval128,4
   [26] => haval160,4
   [27] => haval192,4
   [28] => haval224,4
   [29] => haval256,4
   [30] => haval128,5
   [31] => haval160,5
   [32] => haval192,5
   [33] => haval224,5
   [34] => haval256,5
)


哇!原来hash的运算规则有这么多啊,有好多都是我们所不熟悉的,那么当我们看到一段不规则的字符串的时候,我们如何推断大概是用哪种加密算法生成的呢?请看我们的例子:
引用
我们对http://www.bizeway.net/加密,结果如下:
md2 = 6052a4afb1c91673a19511d87ca7bf9c
md4 = a4b0885c2b84b05320e3f9ac5f16d888
md5 = 5e886a15279d0b021909736d0c7e4eb5
sha1 = b3ef5fc0b12c90353a7355af157e8b5120194516
sha256 = b959552cc7fab5ed47550ba7c0890585c751d78e7a3f6b6866589a7647e4001b
sha384 = 1b0a29f9859d5a7979c39d19df61ed62670b40c6f751f69b9efac9ced84646d234a2ee1601de13db79823d0f8be04c24
sha512 = 0e2ada52b6955ae9b70b1273bfedc6a8974a3a573cd3dee6cf60b9c97de4c78906ed2deb1a291f147ebe0f4bf192680b1a3bef1e9d72f9dca5fecc7c55dd5fdd
ripemd128 = 1c37bca1b2c3a9cd315336b11da1cc51
ripemd160 = 561c00de12c091d4c213baa861c7021474cedae1
ripemd256 = 34dd5a7b2b5cf633c67964f6a2f36266fe24a3b24f9ba4198f09ec839f241181
ripemd320 = ae7bf6f8d0dfcb8072c2f7f7afbecea397570130fa605bb4ee29d65a4049d5a6d00e030938ad2d0c
whirlpool = 8144f3cb8708ca83b1a14438faab52a4b3857a8793ead44c3accacc127b9615f60365dc146522cbda39298fc299a60524eb5e2779f4aa23ed65b156a2b1f1009
tiger128,3 = 982500b72f18c6390b739d0c7f26010b
tiger160,3 = 982500b72f18c6390b739d0c7f26010b839bbed1
tiger192,3 = 982500b72f18c6390b739d0c7f26010b839bbed1a2cb6f6b
tiger128,4 = 3d08e277ad45ea8954631975e30f5857
tiger160,4 = 3d08e277ad45ea8954631975e30f58576cf28c89
tiger192,4 = 3d08e277ad45ea8954631975e30f58576cf28c89eb4de64a
snefru = 271c5f57081c06887292f8e7d852cc1a9b76bc1948fcb31ed748a76650b8ac61
gost = 7344f382e8af17c61e1cd6998d6ad636960f8bcaeeb5c8994130811cce082627
adler32 = 8b082c67
crc32 = f2a81a53
crc32b = ba25f4f1
haval128,3 = d82c54644cca5c6c9b523e8a58089165
haval160,3 = a56db9796f5e54618c3cf8e74719038e525473df
haval192,3 = d56cc89a444810f8c36475a60c8170ced52692a27f9deffb
haval224,3 = fa2759e6289d1b4231df611af6f00a18338964c5e0100aa15975fc02
haval256,3 = 1ec91a5cb89170eb7c185105802850f97a4cf60aa7a3511a8e37a5db804e9917
haval128,4 = aac659a7e7e8f8f5262803d9b49233c4
haval160,4 = e202b7ddeef36e14c5bf8e2e021af865f82c7710
haval192,4 = c7d0dae89617abcc4880e835898de662e22c372fb364d1c4
haval224,4 = 30d8772a3ff47cbc616a58711c4de4555aa04791141f3859d74c5150
haval256,4 = 7748ebecc45adff32b42608f43775fe0803abc908793061cb05923f7d356d303
haval128,5 = 7cd16ab3dd2c05ac2c8c61efd63ea3cb
haval160,5 = 83d38a838eabd27582e423ce31767abc75b4292b
haval192,5 = 1298d602d4761d895f664baa74392b1f544ce1ead2dcc3ad
haval224,5 = a306fe5b1947c39989a23c578f066625d78e0f8a4bd99cbb837f6c40
haval256,5 = a4256c1f4415376340f3ac48e0c26ce9d109297f034392c0341863f5c514eb94

希望上面的资料能够给大家一些帮助
Tags:
PHP | 评论(0) | 引用(0) | 阅读(6089)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]