Solved

asp.net encryption/decryption

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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 …
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

679 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