- It's a 160-bit hash, so using letters and numbers, it'd be log base (10+26) of 2^160, which is roughly 31. So 31 letters.
- Using upper and lower case, it'd be log base (10+26+26) of 2^160, or 27 letters.
- Don't use SHA-1; use SHA-256
- Upper and lower case to represent SHA-256 would be log base (10+26+26) of 2^256, 43 letters
- Internally, it's represented using 32 "letters" of 8 bits each, effectively using every possible ASCII character. The string representation is only of consequence when you're exchanging it over a medium where it needs to be robust and human-readable, and probably the benefit from squeezing it down to fewer characters for that representation is not worth the cost in terms of making it unclear how you've chosen to squeeze it and making life difficult for people who are trying to convert to and from the format. Hexadecimal is a little bigger but it's very clear and unambiguous what you've done, whereas using the full alphabet doesn't have that property.
this post was submitted on 30 Jan 2024
13 points (100.0% liked)
Technology
37742 readers
501 users here now
A nice place to discuss rumors, happenings, innovations, and challenges in the technology sphere. We also welcome discussions on the intersections of technology and society. If it’s technological news or discussion of technology, it probably belongs here.
Remember the overriding ethos on Beehaw: Be(e) Nice. Each user you encounter here is a person, and should be treated with kindness (even if they’re wrong, or use a Linux distro you don’t like). Personal attacks will not be tolerated.
Subcommunities on Beehaw:
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments