Is SHA-256 Case Insensitive?

后端 未结 4 486
予麋鹿
予麋鹿 2021-01-17 10:21

I\'m running a service that is using SHA-256 on two sides of the application - one is a server-side PHP implementation and the other is a client-side iOS implementation. The

4条回答
  •  悲&欢浪女
    2021-01-17 10:33

    No decent cryptographic hash function is case insensitive, because then it would be far easier to produce a collision. The output is a different matter. It's basically a large number (so casing does not apply), but for convenience it is given in base 16, i.e. using the letters a through f as additional digits. Hexadecimal notation is indeed case insensitive, or at least both upper- and lowercase variants are common and recognized. It doesn't matter and does not change what number is represented.

提交回复
热议问题