For an input "hello", SHA-1 returns "aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d", which are 40 hex outputs. I know 1 byte can denote as 1 character, so the 160 bits output should be able to converted to 20 characters. But when I look up "aa" in an ASCII table, there are no such hex value, and I'm confused about that. How to map 160 bits SHA-1 string as 20 characters in ANSI?
相关问题
- facebook error invalid key hash for some devices
- ruby 1.9 wrong file encoding on windows
- WebElement.getText() function and utf8
- How to convert a string to a byte array which is c
- Does specifying the encoding in javac yield the sa
相关文章
- iconv() Vs. utf8_encode()
- Bcrypt vs Hash in laravel
- How to convert hex string into decimal value
- When sending XML to JMS should I use TextMessage o
- Google app engine datastore string encoding proble
- How can i get know that my String contains diacrit
- What is the fastest way to map group names of nump
- Base64 Encoding: Illegal base64 character 3c
ASCII only has 128 characters (7 bits), while ANSI has 256 (8 bits). As to the ANSI value of hex value
AA
(decimal 170), the corresponding ANSI character would beª
(see for example here).Now, you have to keep in mind that a number of both ASCII and ANSI characters (0-31) are non-printable control characters (system bell, null character, etc.), so turning your hash into a readable 20 character string will be not possible in most cases. For instance, your example contains the hex value
0F
, which would translate to a shift-in character.