PC Review


Reply
Thread Tools Rate Thread

How to Decrypt

 
 
=?Utf-8?B?QWw=?=
Guest
Posts: n/a
 
      26th Oct 2004
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
 
Reply With Quote
 
 
 
 
Josip Medved
Guest
Posts: n/a
 
      26th Oct 2004
> 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?

--
Pozdrav,
Josip Medved, MCSD
http://www.jmedved.com

 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      26th Oct 2004
"Al" <(E-Mail Removed)> schrieb:
> 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.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: decrypt problem: Length of the data to decrypt is invalid Oleg Subachev Microsoft C# .NET 4 21st Dec 2006 05:41 AM
Re: decrypt problem: Length of the data to decrypt is invalid Jon Skeet [C# MVP] Microsoft C# .NET 5 21st Dec 2006 01:12 AM
Re: decrypt problem: Length of the data to decrypt is invalid Robson Siqueira Microsoft C# .NET 1 19th Dec 2006 08:55 PM
"Length of the data to decrypt is invalid." when trying to decrypt TripleDes algorithm Dica Microsoft C# .NET 7 28th Oct 2005 02:07 PM
Decrypt PASARI Microsoft Access 1 17th Aug 2003 09:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:40 PM.