How to Decrypt

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top