0

I want to encrypt a string in Classic Asp 3.0 then with querystring this data goes to the web page which coded with C-Sharp and decrypt with C-Sharp.

It is easy encrypting string with classic asp but I can't find how to decrypt it in C-Sharp.

So i need an encryption algorithm works on both C-Sharp and Classic Asp 3.0.

Is there any algorithm ?

Anybody know how can I resolve do this?

Can you suggest?

Can you help me?

Thank you in advance.

Antonio Mailtraq
  • 1,397
  • 5
  • 34
  • 82
  • Have you searched for any? All you need to do is search for one that has a solution written in Classic ASP then perform the same search for C#, for instance [this](http://stackoverflow.com/questions/5749859/triple-des-decryption-in-classic-asp), then [use the tripple DES class in C#](https://msdn.microsoft.com/en-us/library/system.security.cryptography.tripledes(v=vs.110).aspx). – Paul Aug 06 '15 at 12:03

1 Answers1

0

It is always rather complex to interact two different programming languages.

It is preferable to use the same language to encrypt and decrypt strings.

I will suggest to pass to a net page and then redirect the variable that comes from asp classic 3.0 page.

e.g.

In net page :

Response.Redirect("page.aspx?varFromAspPage=" + Encrypt(Request.QueryString["varFromAspPage"].ToString()));

and in your default.aspx.cs page:

Decrypt(Request.QueryString["varFromAspPage"].ToString().Trim())

Below the tutorial for Encrypt and Decrypt strings.

https://chandradev819.wordpress.com/2011/04/11/how-to-encrypt-and-decrypt-password-in-asp-net-using-c/

I hope I have helped you.

Hamamelis
  • 1,983
  • 8
  • 27
  • 41