Re: Upgrading Encryption to .Net not Working!!!!!!!

From: TC (getmyemails2_at_yahoo.com)
Date: 04/25/05


Date: Mon, 25 Apr 2005 13:36:54 -0400

Hey Swat,

That was one thought I had. As it turns out, below is what I needed:

       string encrypted=
System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(passWord,"md5");

Regards,

TC

"swat" <loka_1999@yahoo.com> wrote in message
news:1114438291.499174.280750@o13g2000cwo.googlegroups.com...
> Your VB code is returning the hash in hex, while your C# code is
> returning it as a Base64 encoded string.
>
> Try this:
> -------------------------
> StringBuilder hexVal = new StringBuilder();
> foreach (byte b in bytHash)
> {
> hexVal.Append(b.ToString("X"));
> }
> -------------------------
>
> return hexVal.ToString() instead of Convert.ToBase64String(bytHash)
>
>
> HTH
>



Relevant Pages

  • Convert to Hex in C#
    ... Does anyone know how to convert a hashtable to Hex under C#? ... // Return a base 64 encoded string of the Hash value ... Thanks & Regards, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Re: Problem with instaling ACID
    ... Yash, ... >> Hash: SHA1 ... >> Regards, ...
    (Security-Basics)
  • Re: SWIG Ruby Memory Management
    ... >>> I just wanted to mention a hash table implementation in C which is ... >>> Regards, Pit ... > Hi Matt, ... Right now there are a few people working on bindings ...
    (comp.lang.ruby)
  • Re: Dlookup
    ... That solved the problem in the most elegant way. ... Best regards ... > Hash: SHA1 ...
    (microsoft.public.access.queries)
  • Re: Convert to Hex in C#
    ... I was actually upgrading a VB6 project that used ... >> Does anyone know how to convert a hashtable to Hex under C#? ... >> Thanks & Regards, ...
    (microsoft.public.dotnet.languages.csharp)