Ask a Question related to ASP.NET Security, Design and Development.
-
Mike #1
System.Security.Cryptography.MD5CryptoServiceProvi der
I'm wonder if anyone has tested the
System.Security.Cryptography.MD5CryptoServiceProvi der
against the RFC 1321 Test suite?
For example, here is the list of string to hash for md5:
MD5 ("") = d41d8cd98f00b204e9800998ecf8427e
MD5 ("a") = 0cc175b9c0f1b6a831c399e269772661
MD5 ("abc") = 900150983cd24fb0d6963f7d28e17f72
I haven't been able to these result? Has anyone gotten it
to work? If yes, what did you have to do?
Mike Guest
-
System.Security.SecurityException: Security error
Dear All, The problem or error which I am getting while running my web application is as given below: Security Exception Description: The... -
Crypto API / System.Security.Cryptography questions
1) Where is Key Container created with option CspParameterFlags.UseMachineKeyStore? 2) Where is Key Container created with option... -
MD5CryptoServiceProvider class
Hi ! I have a question:) I'm using the MD5CryptoServiceProvider class because I encrypt the user's password when he/she opens the registration... -
system.web.security
Hi All I am quite new to asp.net and have been following an example of using Forms authentication on a web app. I believe that i have coded... -
More Options for Security System
I checked out Windows XP's security features, and I find it confusing. There should be an easy way for newbies to set the permissions for files and... -
Sébastien Pouliot #2
Re: System.Security.Cryptography.MD5CryptoServiceProvi der
They all work.
using System;
using System.Security.Cryptography;
using System.Text;
public class MD5Test {
public static void Main (string[] args)
{
MD5 hash = MD5.Create ();
byte[] data = new byte [0];
byte[] empty = hash.ComputeHash (data);
Console.WriteLine (BitConverter.ToString (empty));
data = Encoding.ASCII.GetBytes ("a");
byte[] a = hash.ComputeHash (data);
Console.WriteLine (BitConverter.ToString (a));
data = Encoding.ASCII.GetBytes ("abc");
byte[] abc = hash.ComputeHash (data);
Console.WriteLine (BitConverter.ToString (abc));
}
}
One common error in using hash with .NET is hashing a unicode string.
Sebastien
"Mike" <no_spam_plz@mypse.com> wrote in message
news:093b01c39389$64b8c860$a301280a@phx.gbl...> I'm wonder if anyone has tested the
> System.Security.Cryptography.MD5CryptoServiceProvi der
> against the RFC 1321 Test suite?
>
> For example, here is the list of string to hash for md5:
> MD5 ("") = d41d8cd98f00b204e9800998ecf8427e
> MD5 ("a") = 0cc175b9c0f1b6a831c399e269772661
> MD5 ("abc") = 900150983cd24fb0d6963f7d28e17f72
>
> I haven't been able to these result? Has anyone gotten it
> to work? If yes, what did you have to do?
Sébastien Pouliot Guest



Reply With Quote

