Solved

asp.net encryption/decryption

Posted on 2012-03-22
2
275 Views
Last Modified: 2012-08-14
I have attached sample codes from my developer. It is a encryption.cs file that created by our previous developer. Now, my task is to call the encryption and decryption function and write the codes on test.aspx/test.cs file.

In this case, can you show me to call  the function on test.cs? I am new in asp.net/c# development. I do have rich experience in java side.

Thanks
SampleCode.txt
0
Comment
Question by:Webboy2008
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 500 total points
ID: 37754495
This is how the code should be called:-

            
            //Encryption
            string enc1 = Encryption.Encrypt("MyTest");
            string enc2 = Encryption.Encrypt("MyTest1", "1234");
            //Decryption
            string dec1 = Encryption.Decrypt(enc1);
            string dec2 = Encryption.Decrypt(enc2, "1234");

Open in new window

0
 

Author Comment

by:Webboy2008
ID: 37754560
Thank. But I would like to put something like

public string Encryption()
{
return (data already encrypted);
}

public string Decryption()
{
return (data already encrypted)
}
public Page_Load()
{
Response.write Encryption("1111-1111-111-1111") //Credit card Sample No.
}

Can you show me how it works in c#?

Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question