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

I am developing a website for Online recharge in which i need to send a request to the remote server by encrypting the URL.

Recharge Request Foramt is:

http:// www.remoteServerName.in /recharge.ashx?uid=<user_id>&pwd=<password>
&mobileno=<mobile_number>&amt=<recharge_amount>&transid=<transacti
on_id>

How can i encrypt and decrypt the URL without sharing the Key as i am generating Random Key and IV automatically ?

Kindly suggest coding related to this.
Posted
Updated 12-Dec-20 3:18am
Comments
ZurdoDev 6-Aug-13 7:58am    
Why are you generating a random key? How will the other end decrypt it without the key?
Mahesh1220 6-Aug-13 8:02am    
I have used the code from below MSDN:
http://msdn.microsoft.com/en-us/library/system.security.cryptography.rijndaelmanaged.aspx

Suggest me how to encrypt in my web page & decrypting at remote server.
ZurdoDev 6-Aug-13 8:04am    
Just encrypt the values. So it will look like ?uid=dfgkldjfh3465gskjldfhkjgsdh63456&pwd=34lhdfg8345hsv84hdfg for example. But to decrypt you have to have the key.
Mahesh1220 6-Aug-13 8:14am    
thank you...

So I have to give the Key and Decrypt method also.

But i want to generate New Key every time i made a recharge request. How can i implement this?

or any other alternatives to this...?
ZurdoDev 6-Aug-13 8:15am    
Why do you need to give the key?

1 solution

Since you are sending encrypted values to a server that you do not control you will have to ask them what key to use. You will need to use the same key to encrypt the values that they will use to decrypt the values so you will need to agree on a shared key. You won't want to do random keys.
 
Share this answer
 

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