+ Reply to Thread
Results 1 to 4 of 4
Thread: How to encrypt string in c#...
-
09-29-2010, 11:18 PM #1svr2112 Guest
How to encrypt string in c#...
You can use following code for encryption
private string encryptString(string strToEncrypt)
{
System.Text.UTF8Encoding ue = new System.Text.UTF8Encoding();
byte[] bytes = ue.GetBytes(strToEncrypt);
// encrypt bytes
System.Security.Cryptography.MD5Crypto… der md5 = new System.Security.Cryptography.MD5CryptoSe… der();
byte[] hashBytes = md5.ComputeHash(bytes);
// Convert the encrypted bytes back to a string (base 16)
string hashString = "";
for(int i=0;i
{
hashString += Convert.ToString(hashBytes[i],16).PadLef…
}
return hashString.PadLeft(32,'0');
}
_____________
[url=http://www.micrositez.co.uk]Seo Glasgow[/url] | [url=http://www.micrositez.co.uk]Seo Scotland[/url]
-
10-11-2010, 06:46 AM #2
Registered User
- Join Date
- Oct 2010
- Posts
- 3
if u dont want the user to be able to see the querystring, just use action=POST instead of get in ur form tag (by default action=GET). this would hide the querystring from the user. or you could write functions in js to encrypt and decrypt the request url. (use any of the encryption algos.) but i'd still suggest using post action
............................................................
[url=http://www.americancreditreport.com]credit report card[/url]
[url=http://www.usdirectprotect.com/]Car Warranty[/url]
-
05-23-2012, 05:15 AM #3
Registered User
- Join Date
- May 2012
- Posts
- 1
i like this forum very much because i have get a lot of required data from this forum.
now i want to buy some net tools will provide me some tools or guide me about that???
thanks..SEO [url=http://www.seotips4all.com/seo-techniques]seo techniques[/url] [url=http://www.seotips4all.com/learn-seo]learn seo[/url] [url=http://www.seotips4all.com/seo-tutorial]seo tutorial[/url] [url=http://www.seotips4all.com/seo-training]seo training[/url]
-
06-09-2012, 07:44 AM #4
Registered User
- Join Date
- Jun 2012
- Posts
- 1
# How to encrypt string in c
You can use following code for encryption
private string encryptString(string strToEncrypt)
{
System.Text.UTF8Encoding ue = new System.Text.UTF8Encoding();
byte[] bytes = ue.GetBytes(strToEncrypt);
[URL="http://www.vehiculosycasas.com/"]venta coches[/URL], [URL="http://www.vehiculosycasas.com/"]coches y coches[/URL]
thanks


Reply With Quote