Click here to Skip to main content
Click here to Skip to main content

XCrypt - encryption & decryption class wrapper

, 18 Aug 2003 Apache
Rate this:
Please Sign up or sign in to vote.
A generic encryption & decryption class wrapper for C#.

Introduction

This article includes a generic encryption & decryption class wrapper for C#. It also includes two extra algorithms BlowFish & TwoFish which are not included in standard .NET framework library.

Background

The basic concept is from Frank Fang & William M. Rawls 's example code for SymmetricAlgorithm.

The BelowFish code is from Markus Hahn 's BelowFish source code.

The TwoFish code is from Shaun Wilde's ManyMonkey source code of TwoFish.

Please refer this website to get more information about BlowFish and TwoFish.

Using the code

The sample code initializes the engine to 3DES, you also can call InitializeEngine again to reset the engine to a different algorithm.

XCryptEngine xe = new XCryptEngine();
...
xe.InitializeEngine(XCryptEngine.AlgorithmType.TripleDES);

enc_str = xe.Encrypt(src_str);
dec_str = xe.Decrypt(enc_str);

xe.DestroyEngine();

History

  • 01/06/2003 - First package finished.

License

This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0

Share

About the Author

pdwolf

Singapore Singapore
No Biography provided

Comments and Discussions

 
GeneralMy vote of 5 Pinmemberbitzhuwei4-Jan-13 14:43 
GeneralMy vote of 3 Pinmemberyogeshpatil.psspl1-Jan-12 20:14 
Questionpossibly stupid question, twofish IV/key static to 0's? PinmemberVertigo00712-Sep-11 12:20 
Generalgot error in using BlowFish decryption Pinmemberthefalcon7927-Mar-10 10:15 
Generalcan't compile this project PinmemberMember 365176815-Feb-10 4:22 
QuestionWhat about to use this code??? PinmemberMichael Schaller18-Jun-08 12:08 
AnswerRe: What about to use this code??? Pinmemberpdwolf25-Jun-08 4:12 
NewsTwo other related encryption articles in CodeProject ... PinmemberTony Selke27-Sep-07 7:12 
GeneralRe: Two other related encryption articles in CodeProject ... PinmemberVerifier30-Sep-07 22:45 
AnswerRe: Two other related encryption articles in CodeProject ... PinmemberTony Selke1-Oct-07 2:10 
Generalcannot decrypt in php PinmemberMihai Dobrescu15-Feb-07 10:20 
GeneralDoesn't decrypt in VS 2005 Pinmemberjtang12327-Mar-06 14:46 
GeneralNot able to Decrypt Pinmemberglthomas2913-Jan-06 3:40 
GeneralRe: Not able to Decrypt PinmemberShawn Bass18-Jan-06 5:25 
GeneralA little fix about key generator strategy PinmemberNigai27-Jul-05 4:12 
GeneralMinimum OS Requirements PinmemberaBrookland25-Jul-05 4:14 
GeneralRe: Minimum OS Requirements Pinmemberpdwolf1-Aug-05 14:11 
GeneralRe: Minimum OS Requirements Pinmemberborcondex18-Oct-05 8:33 
Generalsomething is wrong Pinmemberphatrice937-Jul-05 16:55 
GeneralSpeed run Pinmembergodfathers17-Mar-05 23:01 
GeneralRe: Speed run PinmemberAshok Dhamija31-Dec-05 4:47 
Questionencrypting öäu?? PinmemberDavid30017-May-04 3:22 
AnswerRe: encrypting öäu?? PinmemberMarcus E25-Oct-04 12:35 
GeneralRe: encrypting öäu?? PinmemberSk8tz10-Mar-05 0:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141030.1 | Last Updated 19 Aug 2003
Article Copyright 2003 by pdwolf
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid