System.Security.Cryptography.MD5CryptoServiceProvi der

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. Crypto API / System.Security.Cryptography questions
      1) Where is Key Container created with option CspParameterFlags.UseMachineKeyStore? 2) Where is Key Container created with option...
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139