Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > MD5 encryption examples

Reply
Thread Tools

MD5 encryption examples

 
 
Kenneth
Guest
Posts: n/a
 
      11-16-2003
Hi,

I need an example on MD5 encryption.

In a ascii textfile I have a date in string format. I need
an example how to compute a hash value on the datestring
and another method to compare the two with each other.

TIA

/Kenneth
 
Reply With Quote
 
 
 
 
Alek Davis
Guest
Posts: n/a
 
      11-17-2003
Kenneth,

If you want to use MD5 (or SHA-1) hashing, the easiest way would be to call
the HashPasswordForStoringInConfigFile method, which returns a bas64-encoded
hash value. e.g.:

// C# code
using System.Web.Security;
....
string base64HashValue =
FormsAuthentication.HashPasswordForStoringInConfig File
("1/2/2003 7:04 PM", "md5");

Then you can simply compare strings. If you want to keep the hashed value in
the byte array format (or want to do something more sophisticated), check
this example: http://www.obviex.com/samples/hash.aspx.

Alek

"Kenneth" <(E-Mail Removed)> wrote in message
news:517201c3ac5b$2b64e5e0$(E-Mail Removed)...
> Hi,
>
> I need an example on MD5 encryption.
>
> In a ascii textfile I have a date in string format. I need
> an example how to compute a hash value on the datestring
> and another method to compare the two with each other.
>
> TIA
>
> /Kenneth



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
create a md5 / md5 passwd with a salt Peter Woodsky Ruby 6 11-21-2008 09:08 AM
MD5 encryption le0 ASP .Net 1 09-18-2006 08:55 AM
md5 from python different then md5 from command line ursache.marius@gmail.com Python 9 05-07-2006 11:49 PM
I remember someone asking about an MD5 javascript: http://pajhome.org.uk/crypt/md5/ Mozzie \( v \) Javascript 0 07-12-2004 01:06 PM



Advertisments