MD5 是 128 位,但为什么是 32 个字符? [英] MD5 is 128 bits but why is it 32 characters?

查看:37
本文介绍了MD5 是 128 位,但为什么是 32 个字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了一些关于 md5 的文档,它说它是 128 位,但为什么它是 32 个字符?我无法计算字符.

I read some docs about md5, it said that its 128 bits, but why is it 32 characters? I can't compute the characters.

  • 1 字节为 8 位
  • 如果 1 个字符是 1 个字节
  • 那么 128 位就是 128/8 = 16 字节,对吗?

SHA-1 产生 160 位,那么有多少个字符?

SHA-1 produces 160 bits, so how many characters are there?

推荐答案

32 个字符作为十六进制表示,即每字节 2 个字符.

32 chars as hexdecimal representation, thats 2 chars per byte.

这篇关于MD5 是 128 位,但为什么是 32 个字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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