Re: AspCrypt using .NET framework?
- From: "Panya" <hobbitam@xxxxxxxxx>
- Date: 30 May 2006 20:28:38 -0700
Gaurav Vaish (www.EduJini.IN) wrote:
If it's the plain old Unix style, it should be DES.
If it's the new style with shadow, it must be MD5.
btw, what's the length of the encrypted password that you get from
AspCrypt... that may ring some bells of mine...
So I guess it should be DES.
The result from AspCrypt's been somthing like
"aa0LEL4gR0chI"
where two first charactors are password salt.
And this is the code I adapt from one I found in Google
========================
Dim inputByteArray() As Byte = _
System.Text.Encoding.Default.GetBytes(Password)
Dim des As New DESCryptoServiceProvider
des.GenerateKey()
des.GenerateIV()
Dim ms As New MemoryStream
Dim cs As New CryptoStream( _
ms, des.CreateEncryptor(), CryptoStreamMode.Write)
cs.Write(inputByteArray, 0, inputByteArray.Length)
cs.FlushFinalBlock()
Dim ret As New System.Text.StringBuilder
For Each b As Byte In ms.ToArray()
ret.AppendFormat("{0:X2}", b)
Next
Return ret.ToString()
========================
I don't really understand the code above.
I don't even know how to put "salt" in it.
The result from this function looks like
"0E16710C4E90D4C2"
So I'm not sure do I go the right way.
Thanks,
Panya
.
- Follow-Ups:
- Re: AspCrypt using .NET framework?
- From: Gaurav Vaish \(www.EduJini.IN\)
- Re: AspCrypt using .NET framework?
- References:
- AspCrypt using .NET framework?
- From: hobbitam
- Re: AspCrypt using .NET framework?
- From: Gaurav Vaish \(www.EduJini.IN\)
- AspCrypt using .NET framework?
- Prev by Date: Re: .NET 2.0 Trust issue on Hosted Server
- Next by Date: Re: website restricted to fixed public IP or to only PC wth predefined configuration
- Previous by thread: Re: AspCrypt using .NET framework?
- Next by thread: Re: AspCrypt using .NET framework?
- Index(es):
Relevant Pages
|