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

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

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

Comments and Discussions

 
GeneralOnce again PinmemberPaul Ingles12-Oct-04 2:12 
Generalsecurity level "homework" PinmemberCorinna John12-Oct-04 2:05 

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 | Mobile
Web04 | 2.8.141015.1 | Last Updated 12 Oct 2004
Article Copyright 2004 by immaad
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid