Click here to Skip to main content
12,508,112 members (48,209 online)
Click here to Skip to main content
Add your own
alternative version

Stats

34.4K views
318 downloads
8 bookmarked
Posted

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.

Introduction

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:

ThisW
orldI
sAMys
teryx

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 :)

License

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

Share

About the Author

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

You may also be interested in...

Pro
Pro

Comments and Discussions

 
GeneralOnce again Pin
Paul Ingles12-Oct-04 2:12
memberPaul Ingles12-Oct-04 2:12 
Generalsecurity level "homework" Pin
Corinna John12-Oct-04 2:05
memberCorinna John12-Oct-04 2: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.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160927.1 | Last Updated 12 Oct 2004
Article Copyright 2004 by immaad
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid