1

For the encrypted base64 encoded SHAX strings, what command can decrypt it back to original string, thanks

0

1 Answer 1

2

From the linked post, your original string was generated by a method such as

echo -n foo | openssl dgst -binary -sha1 | openssl base64

What this generates is a digest, with SHA1 being the method of calculating the digest.

In this situation there is insufficient data to reconstruct the original string. This digest is a checksum of the original string and can be used for validation; to verify a message hasn't been tampered with.

So if you have a file xyzzy that contains your message you can run

cat xyzzy | openssl dgst -binary -sha1 | openssl base64

If the result is the same string as you started with then you can be confident it hasn't been modified.

The best you can do is remove the base64 part to get the binary digest:

echo $base64string | openssl base64 -d

but this is not the original message, just the checksum. The original message is not reconstructable from the digest.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .