md5 中的 aes 16 字节大小
aes 16byte size in md5
我正在尝试理解一些代码
The 32-byte AES encryption key and the 16-byte IV are both derived from the password and the salt like so:
salted = password . salt # . is the concatenation of the two
key1 = md5(salted) # key1 is 16 bytes long
key2 = md5(key1 . salted) # key2 is 16 bytes long
iv = md5(key2 . salted) # this is the 16-byte IV
aeskey = key1 . key2 # this is the 32-byte AES key
md5(salted) 怎么可以是 16 字节?即使 md5 是 32 字节?
MD5 有一个 128 位(16 字节)的输出,而且一直都是。打印为十六进制时为 32 个字符,但那是因为每 两个 十六进制数字代表一个字节。
我正在尝试理解一些代码
The 32-byte AES encryption key and the 16-byte IV are both derived from the password and the salt like so:
salted = password . salt # . is the concatenation of the two
key1 = md5(salted) # key1 is 16 bytes long
key2 = md5(key1 . salted) # key2 is 16 bytes long
iv = md5(key2 . salted) # this is the 16-byte IV
aeskey = key1 . key2 # this is the 32-byte AES key
md5(salted) 怎么可以是 16 字节?即使 md5 是 32 字节?
MD5 有一个 128 位(16 字节)的输出,而且一直都是。打印为十六进制时为 32 个字符,但那是因为每 两个 十六进制数字代表一个字节。