Maximum length for MD5 input/output

前端 未结 7 2143
情歌与酒
情歌与酒 2020-12-02 11:45

What is the maximum length of the string that can have md5 hashed? Or: If it has no limit, and if so what will be the max length of the md5 output value?

7条回答
  •  庸人自扰
    2020-12-02 12:26

    • The length of the message is unlimited.

    Append Length

    A 64-bit representation of b (the length of the message before the padding bits were added) is appended to the result of the previous step. In the unlikely event that b is greater than 2^64, then only the low-order 64 bits of b are used.

    • The hash is always 128 bits. If you encode it as a hexdecimal string you can encode 4 bits per character, giving 32 characters.
    • MD5 is not encryption. You cannot in general "decrypt" an MD5 hash to get the original string.

    See more here.

提交回复
热议问题