Recent

Author Topic: how to convert md5 into a string?  (Read 788 times)

rezzvy

  • Newbie
  • Posts: 2
how to convert md5 into a string?
« on: May 02, 2021, 06:19:44 am »
hi. i'm new in this thing and my english is not that good. so i'm sorry if it is not clear but i'll try my best.
okey so i tried to convert string to md5 by following this page https://wiki.freepascal.org/hash
and it's working but i have another question since i already convert string to md5 i have to convert it back into string but i don't know how. i was looking a refrence of it in internet but i did not found it or i don't understand. so is there any way to do it?
thank you in advance. and i'm sorry if my english is bad

ASerge

  • Hero Member
  • *****
  • Posts: 1784
Re: how to convert md5 into a string?
« Reply #1 on: May 02, 2021, 07:06:00 am »
...but i have another question since i already convert string to md5 i have to convert it back into string but i don't know how
Apparently this is a joke. Of course, this is not possible, because MD5 is only a hash, not encryption.

rezzvy

  • Newbie
  • Posts: 2
Re: how to convert md5 into a string?
« Reply #2 on: May 02, 2021, 08:11:33 am »
...but i have another question since i already convert string to md5 i have to convert it back into string but i don't know how
Apparently this is a joke. Of course, this is not possible, because MD5 is only a hash, not encryption.

i am sorry i did know that.. i really do ahahahaha my fault sir, thanks for the explanation

Remy Lebeau

  • Hero Member
  • *****
  • Posts: 921
    • Lebeau Software
Re: how to convert md5 into a string?
« Reply #3 on: May 03, 2021, 08:18:09 pm »
since i already convert string to md5 i have to convert it back into string but i don't know how.

A hash is only a one-way value.  You cannot decode a hash back into the original data it came from.  All you can do is hash two pieces of data and compare if they have the same hash.

so is there any way to do it?

No.  If you need 2-way encoding and decoding, you need encryption, not hashing.
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)

Nimral

  • Full Member
  • ***
  • Posts: 154
  • Keep it simple.
Re: how to convert md5 into a string?
« Reply #4 on: May 07, 2021, 09:45:35 am »
since i already convert string to md5 i have to convert it back into string but i don't know how. i was looking a refrence of it in internet but i did not found it or i don't understand. so is there any way to do it?
thank you in advance. and i'm sorry if my english is bad

If I guess your intention right, and if you are indeed after encryption and decryption, look into the blowfish library (built in, just "uses Blowfish") and/or what dcpcrypt (available via the Online Package Manager) offer. Both are well documented in the Wiki.

And don't throw the MD5 code away, you will probably come back to it when you continue thinking about how you store a password, come to the conclusion that this is an exceptionally bad idea (if you can decrypt the password, anyone else can too), and finally reach at the point where everyone reaches sooner or later: don't ever store a password, but store a password hash derived from it. Since hashes are mathematically (almost) irreversible, nobody can restore your original password if he somehow got at the hash bytes, e.g. by stealing te password file from your harddrive. This is where hashing algorithms have one of their primary uses.

Armin.
Lazarus 2.0.10 on Windows 10, Raspberry Pi OS, VMWare Workstation

 

TinyPortal © 2005-2018