Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I wish to Encrypt/Decrypt Querystrings in my application.

I am using DESCryptoServiceProvider to do that. Works fine.

But the encrypted code is of 12 or more than 12 characters. I want to limit the character upto 5.

For eg: Encrypt("abcd", "r0b1nr0y") generates pQGcY9az5HM= i want to limit it to pQGc is it possible using this Algo.

Or if there is any other, please let me know.

Thanks
Posted
Updated 22-Dec-11 1:11am
v2
Comments
Amir Mahfoozi 22-Dec-11 12:12pm    
You can make your custom algorithm for encryption :) and it is an acceptable method in encryption world.

1 solution

You can't control the length of an encrypted string. The encrypted version is what it is - end of discussion.
 
Share this answer
 
Comments
krishnaMurali 23-Dec-11 2:29am    
i want the encrypted key similar to that is in http://bit.ly site.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900