How can i decode md5_base64 encoded data to get back original data ?
You cannot. MD5 is not an encoding, it is a Digital fingerprint or Digest.
That is, a one-way hashing algorithm that cannot be reversed, because every MD5 digest can result from applying the algorithm to many different input texts.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
| [reply] |
In the general case, you can't, as BrowserUK says, md5 is digest, not a cypher so you can't decrypt.
If the list of plaintexts is small and known, you could construct a lookup table that will allow you to convert from one to the other, but that is limited by the time it takes to pre-compute hashes, and the disc space to store them all. Likewise if you can guess plaintext, then you can check your guesses.
There are services online that have access to big lookup tables to decrypted hashed passwords, though they are only suitable for short common passwords, and even then don't work very well. For example I tested with the md5 hash for "password" and "secret". md5decrypter.co.uk successfully decrypted "secret", while md5crack.com was not able to crack either hash.
I should also remind you that depending on the circumstances, cracking passwords in this way may be illegal, unethical, or against the rules of your employer. You should tread with caution, and seek advice before attempting to reverse any md5 hashed data or password that you did not originate yourself.
| [reply] |
#!/usr/bin/perl
use strict;
use warnings;
use Crypt::RC4;
use MIME::Base64;
my $key = "abcdefghijklm";
my $plaintext = "Hello, World!";
my $encrypted = RC4($key, $plaintext);
my $encoded = encode_base64($encrypted);
my $decoded = decode_base64($encoded);
print "$encoded\n";
print "$decoded\n";
my $decrypted = RC4($key, $decoded);
print "$decrypted\n";
| [reply] [d/l] |
| [reply] |
You can think of a digest algorithm as being a bit like the human digestive system. The human digestive system takes an input (food), and produces an output (excrement). You cannot turn the output back into the original input. And even if you could, you probably shouldn't be doing that.
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
| [reply] |