How to Decrypt

G

Guest

Hi
I am using the follwoing method to encrypt a passowrd. But I like to decrypt
back to original string. How would i do that?

Thanks
the method i am using
Public Shared Function Encrypt(ByVal cleanString As String) As String
Dim clearBytes As [Byte]()
clearBytes = New UnicodeEncoding().GetBytes(cleanString)
Dim hashedBytes As [Byte]() =
CType(CryptoConfig.CreateFromName("MD5"),
HashAlgorithm).ComputeHash(clearBytes)
Dim hashedText As String = BitConverter.ToString(hashedBytes)
Return hashedText
End Function

Thanks so much
 
J

Josip Medved

Hi
I am using the follwoing method to encrypt a passowrd. But I like to
decrypt
back to original string. How would i do that?


But why would you that?
 
H

Herfried K. Wagner [MVP]

Al said:
I am using the follwoing method to encrypt a passowrd.
But I like to decrypt back to original string. How would
i do that?

Thanks
the method i am using
Public Shared Function Encrypt(ByVal cleanString As String) As
String
Dim clearBytes As [Byte]()
clearBytes = New UnicodeEncoding().GetBytes(cleanString)
Dim hashedBytes As [Byte]() =
CType(CryptoConfig.CreateFromName("MD5"),
HashAlgorithm).ComputeHash(clearBytes)
Dim hashedText As String = BitConverter.ToString(hashedBytes)
Return hashedText
End Function

Your function calculates a hash value of the password. There is no way to
restore the password from this hash value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top