this post was submitted on 30 Jan 2024
13 points (100.0% liked)

Technology

37602 readers
252 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
 

The sha1 hash for 64test64xa is 6779c53432b8badf049bb9d8924a5785dd887243 which is 41 characters only using hexadecimal, 10digits and 6letters. But how long it would be if it was using the whole 26 letters in the latin alphabet? What if it also differentiated between UPPER and lower cases?

you are viewing a single comment's thread
view the rest of the comments
[–] Melody@lemmy.one 2 points 8 months ago (2 children)

Yeah you can always take a hex hash output and convert it to Base64...which does conpress it significantly. Apply LZ Compression and boom.

[–] tunetardis@lemmy.ca 2 points 8 months ago

Apply LZ Compression and boom.

That would produce a binary stream. If that's what OP wants, they could just leave the original hash in binary. And that would be unlikely to compress any further since hashes are, by their nature, high entropy already.

[–] sarmale@lemmy.zip 1 points 8 months ago* (last edited 8 months ago) (1 children)

Tried to convert to base 64 and.. it actually makes it longer. Why?

[–] Melody@lemmy.one 3 points 8 months ago (1 children)

You didn't convert a hex number into Base64, you Base64 encoded the hex string.

TL;DR, you used the wrong tool.

[–] sarmale@lemmy.zip 1 points 8 months ago (2 children)

Whats the right tool? Cant seem to find one

[–] rnd@beehaw.org 3 points 8 months ago

If you're using Linux (or macOS or MinGW or CygWin or MSYS), you can do something like this in the terminal:

xxd -r -ps | base64

The first command will read the standard input and decode hex strings back into raw data, and the second one will do base64 to the output.

If I pass the hex string mentioned in your original post through this command, I get:

Z3nFNDK4ut8Em7nYkkpXhd2IckM=
[–] Melody@lemmy.one 1 points 8 months ago

https://ciphereditor.com/share#blueprint=eyJ0eXBlIjoiYmx1ZXByaW50IiwicHJvZ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