Solved

asp.net encryption/decryption

Posted on 2012-03-22
2
272 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
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

770 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