473,326 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

MD5 Encryption

I need to create an MD5 encrypted variable to be passed to another web
technology.
the receiving end will take care of itself. However, i can't figure out how
to generate a simple hash value in asp.net VB
here is what i want to do:
given this string "hello"
create a hash value (MD5) and use a response.write to display it on screen.
that is all.

I've seen a few articals but i am looking for a simple example. I really
appreciate the help,
Thanks
KES
--
Share The Knowledge. I need all the help I can get and so do you!
Jun 19 '07 #1
6 4179
Fairly sure this snippet still works- dont know where it came from!

private string getHash(string Value)
{
System.Security.Cryptography.MD5CryptoServiceProvi der sec = new
System.Security.Cryptography.MD5CryptoServiceProvi der();
byte[] encodedData = System.Text.Encoding.ASCII.GetBytes(Value);
encodedData = sec.ComputeHash(encodedData);
string retVal = "";
for (int i=0; i < encodedData.Length; i++)
retVal += encodedData[i].ToString("x2").ToLower();
return retVal;
}

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog

"Yankee Imperialist Dog" <Ya******************@discussions.microsoft.com>
wrote in message news:FE**********************************@microsof t.com...
>I need to create an MD5 encrypted variable to be passed to another web
technology.
the receiving end will take care of itself. However, i can't figure out
how
to generate a simple hash value in asp.net VB
here is what i want to do:
given this string "hello"
create a hash value (MD5) and use a response.write to display it on
screen.
that is all.

I've seen a few articals but i am looking for a simple example. I really
appreciate the help,
Thanks
KES
--
Share The Knowledge. I need all the help I can get and so do you!

Jun 19 '07 #2
I've posted a VB.NET example of the MD5 hashing syntax here:
http://SteveOrr.net/faq/encrypt.aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

"Yankee Imperialist Dog" <Ya******************@discussions.microsoft.com>
wrote in message news:FE**********************************@microsof t.com...
>I need to create an MD5 encrypted variable to be passed to another web
technology.
the receiving end will take care of itself. However, i can't figure out
how
to generate a simple hash value in asp.net VB
here is what i want to do:
given this string "hello"
create a hash value (MD5) and use a response.write to display it on
screen.
that is all.

I've seen a few articals but i am looking for a simple example. I really
appreciate the help,
Thanks
KES
--
Share The Knowledge. I need all the help I can get and so do you!
Jun 20 '07 #3
Thank You, Having a bad day i guess.
The example is what i needed as is the one from John.
You're both fine Americans!

--
Share The Knowledge. I need all the help I can get and so do you!
"Steve C. Orr [MCSD, MVP, CSM, ASP Inside" wrote:
I've posted a VB.NET example of the MD5 hashing syntax here:
http://SteveOrr.net/faq/encrypt.aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

"Yankee Imperialist Dog" <Ya******************@discussions.microsoft.com>
wrote in message news:FE**********************************@microsof t.com...
I need to create an MD5 encrypted variable to be passed to another web
technology.
the receiving end will take care of itself. However, i can't figure out
how
to generate a simple hash value in asp.net VB
here is what i want to do:
given this string "hello"
create a hash value (MD5) and use a response.write to display it on
screen.
that is all.

I've seen a few articals but i am looking for a simple example. I really
appreciate the help,
Thanks
KES
--
Share The Knowledge. I need all the help I can get and so do you!
Jun 20 '07 #4
Thank You, Having a bad day i guess.
The example is what i needed as is the one from Steve
--
Share The Knowledge. I need all the help I can get and so do you!
"John Timney (MVP)" wrote:
Fairly sure this snippet still works- dont know where it came from!

private string getHash(string Value)
{
System.Security.Cryptography.MD5CryptoServiceProvi der sec = new
System.Security.Cryptography.MD5CryptoServiceProvi der();
byte[] encodedData = System.Text.Encoding.ASCII.GetBytes(Value);
encodedData = sec.ComputeHash(encodedData);
string retVal = "";
for (int i=0; i < encodedData.Length; i++)
retVal += encodedData[i].ToString("x2").ToLower();
return retVal;
}

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog

"Yankee Imperialist Dog" <Ya******************@discussions.microsoft.com>
wrote in message news:FE**********************************@microsof t.com...
I need to create an MD5 encrypted variable to be passed to another web
technology.
the receiving end will take care of itself. However, i can't figure out
how
to generate a simple hash value in asp.net VB
here is what i want to do:
given this string "hello"
create a hash value (MD5) and use a response.write to display it on
screen.
that is all.

I've seen a few articals but i am looking for a simple example. I really
appreciate the help,
Thanks
KES
--
Share The Knowledge. I need all the help I can get and so do you!


Jun 20 '07 #5
Except that I'm English - but thats OK! LOL!

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Yankee Imperialist Dog" <Ya******************@discussions.microsoft.com>
wrote in message news:9C**********************************@microsof t.com...
Thank You, Having a bad day i guess.
The example is what i needed as is the one from John.
You're both fine Americans!

--
Share The Knowledge. I need all the help I can get and so do you!
"Steve C. Orr [MCSD, MVP, CSM, ASP Inside" wrote:
>I've posted a VB.NET example of the MD5 hashing syntax here:
http://SteveOrr.net/faq/encrypt.aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

"Yankee Imperialist Dog" <Ya******************@discussions.microsoft.com>
wrote in message
news:FE**********************************@microso ft.com...
>I need to create an MD5 encrypted variable to be passed to another web
technology.
the receiving end will take care of itself. However, i can't figure out
how
to generate a simple hash value in asp.net VB
here is what i want to do:
given this string "hello"
create a hash value (MD5) and use a response.write to display it on
screen.
that is all.

I've seen a few articals but i am looking for a simple example. I
really
appreciate the help,
Thanks
KES
--
Share The Knowledge. I need all the help I can get and so do you!

Jun 21 '07 #6
Hey the Bit's are cool!!! Any citizen of a country that can come up with Dr.
Who (Tom Baker), the Prisoner, Rock Follies, and, not to mention Viz Mag. is
equal to any ultra consertive Imperialist such as myself!
so i say again: Your a fine American!!!
:-) (lets hope we can all take a joke, lifes too short!)
--
Share The Knowledge. I need all the help I can get and so do you!
"John Timney (MVP)" wrote:
Except that I'm English - but thats OK! LOL!

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Yankee Imperialist Dog" <Ya******************@discussions.microsoft.com>
wrote in message news:9C**********************************@microsof t.com...
Thank You, Having a bad day i guess.
The example is what i needed as is the one from John.
You're both fine Americans!

--
Share The Knowledge. I need all the help I can get and so do you!
"Steve C. Orr [MCSD, MVP, CSM, ASP Inside" wrote:
I've posted a VB.NET example of the MD5 hashing syntax here:
http://SteveOrr.net/faq/encrypt.aspx

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

"Yankee Imperialist Dog" <Ya******************@discussions.microsoft.com>
wrote in message
news:FE**********************************@microsof t.com...
I need to create an MD5 encrypted variable to be passed to another web
technology.
the receiving end will take care of itself. However, i can't figure out
how
to generate a simple hash value in asp.net VB
here is what i want to do:
given this string "hello"
create a hash value (MD5) and use a response.write to display it on
screen.
that is all.

I've seen a few articals but i am looking for a simple example. I
really
appreciate the help,
Thanks
KES
--
Share The Knowledge. I need all the help I can get and so do you!


Jun 21 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Cliff | last post by:
We are trying to connect to 3 different Oracle databases using MS Access as the front-end and ODBC as the connection. The problem that we are having is that 1 of the databases requires a...
113
by: Bonj | last post by:
I was in need of an encryption algorithm to the following requirements: 1) Must be capable of encrypting strings to a byte array, and decyrpting back again to the same string 2) Must have the same...
7
by: Alan Silver | last post by:
Hello, I am writing a page where sensitive data is collected (over SSL) and stored in a database. I have been looking at the .NET encryption classes, but am a bit confused as to which is best...
2
by: Sumit Gupta | last post by:
Can anyone please tell me how to encrpt string or any kind of Data. Also the Algorithm of Compression. Any Link tutorial etc. Like : Zip or RAR Formats etc.
9
by: sweety | last post by:
Dear All, How to encrypt a C data file and make binary file and then have to read a bin file at run time and decrypt the file and have to read the data. Any help to achive this pls. Would be...
4
by: pintu | last post by:
Hello everybody.. I hav some confusion regarding asymmetric encryption.As asymmetric encryption it there is one private key and one public key.So any data is encrypted using private key and the...
1
by: =?Utf-8?B?bWljcm9ob2Y=?= | last post by:
Short version: Is there a way to configure (preferably programmatically) the max encryption strength that will be used by the framework when connecting to a particular SSL-protected web service? ...
11
by: John Williams | last post by:
I've written a simple program to do XOR encryption as my first foray into understanding how encryption works. The code compiles fine, however it segmentation faults on every run. using gdb to...
22
by: j1mb0jay | last post by:
I have had to create a simple string encryption program for coursework, I have completed the task and now have to do a write up on how it could be improved at a later date. If you could look...
19
by: klenwell | last post by:
Another request for comments here. I'd like to accomplish something like the scheme outlined at this page here: http://tinyurl.com/3dtcdr In a nutshell, the form uses javascript to hash...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.