decrypt MD5 base64 with Swift 4

2.9k Views Asked by At

I'm getting an encrypted md5 base 64 string encrypted with a key, this encryption is done in .Net, I need to decrypt that string using swift 4, but i can't find the way to to this, has anyone know if this is possible?

1

There are 1 best solutions below

1
On

MD5 is what's known as a hashing algorithm, which is fundamentally different from an encryption algorithm. It was designed to be a one-way process whereas encryption can be decrypted to obtain the original data.

If you're looking to decrypt the data passed from .Net then it's going to need to be passed as encrypted, not hashed. There are many encryption options to choose from and some of the more popular ones are easily incorporated into a .Net project via NuGet.

If you have the key and the string, and need to ensure the hash sent wasn't tampered with then the link Ryan posted in the comments is what you're looking for.