Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

asp.net encryption/decryption

Posted on 2012-03-22
2
Medium Priority
?
277 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

715 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