Tuesday 10 January 2012

Simple Encryption and Decryption

Monoalphabetical Substitution Cipher in Flex Monoalphabetic Substitution Cipher is a encryption algorithm which was used in old times. In this algorithm each letter is replaced with another letter according to the cipher alphabet based on the key word.
Look at the following example:
key word: leila
PlainText Alphabet: abcdefghijklmnopqrstuvwxyz
CipherText Alphabet: leiabcdfghjkmnopqrstuvwxyz
Following is the ActionScript code for the ciphering by monoalphabetic algorithm.

Following is the monoalphabetic cipher MXML codes in Flex.


Following is the screen shot  of monoalphabetic cipher algorithm in flex to show how the codes work.

No comments:

Post a Comment