Monday, March 19, 2012

[Ruby] Rail Fence Cipher Extended

          Hello, Reader ^^! Back again with source code. This time is a  Rail Fence Cipher Extended which is made from Ruby programming language. This one is a bit difficult and tricky. The formula needed is also tricky. The coding of encryption is easier than the decryption. The difference with the normal version is that the Extended version also accept non-number and non-alphabet character. The alphaber is case-sensitive in this version. Now for a bit of demonstration:


Take a string "Hello World!" 
Don't remove any character unlike the non-extended version.


Now, let's arrange them like this:


H   o   r
 e l   o l !
  l   w   d


Now, based on its arranged form, from left to right and below, it is turned into HOLELWRDLO as the encryption result. That's how the Rail Fence Cipher do.


Okay, that's all I can say. Thank you for reading ^^!


Download/View Source Code
- Dropbox
- Dropbox (Repository)
- GitHub
GitHub (Repository)





No comments:

Post a Comment