Click here to Skip to main content
15,897,968 members
Articles / Desktop Programming / Windows Forms

Securing Data in .NET

Rate me:
Please Sign up or sign in to vote.
4.81/5 (29 votes)
28 Oct 2007CPOL10 min read 93.3K   5.9K   108  
Need to learn further on cryptology? This article takes an overview of common cryptosystems, along with a step by step description of the Data Encryption Standard and the Advanced Encryption Standard.
//Copyright (c), October 2007, Some Rights Reserved 
//By Murat Firat
 
using System;
namespace Cipher
{
    delegate void ProgressEventHandler(object o, ProgressEventArgs args);

    interface ICipher
    {     
        void Decrypt(string SourceFileName, string DestinationFileName, string Key);
        
        byte[] Decrypt(byte[] BytesInput, string Key);
        
        byte[] Encrypt(byte[] BytesInput, string Key);
        
        void Encrypt(string SourceFileName, string DestinationFileName, string Key);
    }

    class ProgressEventArgs : EventArgs
    {
        public ProgressEventArgs()
        { }

        public ProgressEventArgs(int i)
        { progress = i; }

        public ProgressEventArgs(int i, bool b)
        { progress = i; stop = b; }

        public int progress;
        public bool stop;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Turkey Turkey
Has BS degree on computer science, working as software engineer in istanbul.

Comments and Discussions