.

Showing posts with label rail. Show all posts
Showing posts with label rail. Show all posts

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 ^^!







Friday, March 16, 2012

[Ruby] Rail Fence Cipher

          Hello, Reader ^^! Back again with source code. This time is a  Rail Fence Cipher 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. Now for a bit of demonstration:


Take a string "Hello World!"
Remove all non-number and non-alphabet. Uppercase all of the string. Remove all the space. The result:
"HELLOWORLD"


Now, let's arrange them like this:


H   O   L
 E L W R D
  L   O


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 ^^!