Click here to Skip to main content
13,297,547 members (49,924 online)
Click here to Skip to main content
Add your own
alternative version


8 bookmarked
Posted 11 Oct 2004

Classic Encryption

, 11 Oct 2004
Rate this:
Please Sign up or sign in to vote.
This code implements classic encryption technique in an easy and reusable way.


The code implements a classic encryption technique to be reused in other project where security required is of intermediate level.

The algorithm write the given string in a 2-D array whose columns are based on the length of the key. Then the string is read on a column by column basis in the order of the key.

For example if the string to encode is "ThisWorldIsAMystery" and key is 34125 then the 2D array will be created like:


some characters are appended at the end to fill the array.

It will be read like this, 1st column, 2nd column, 3rd column and so on. The encoded string will become "ilMrsdyyTosthrAeWIsx".

The decryption will definitely be its reverse :)


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Software Developer
Australia Australia
C/C++, C# .NET, VB.NET, Linux, Oracle, PostgreSQL, MYSQL

You may also be interested in...

Comments and Discussions

GeneralOnce again Pin
Paul Ingles12-Oct-04 3:12
memberPaul Ingles12-Oct-04 3:12 
Generalsecurity level "homework" Pin
Corinna John12-Oct-04 3:05
memberCorinna John12-Oct-04 3:05 

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

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

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.171207.1 | Last Updated 12 Oct 2004
Article Copyright 2004 by immaad
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid