With the Skip Cipher we jump a given number of characters. For example, if we take a message of 'Hello', and jump two characters at a time we get 'Hloel'
Skip Cipher |
Coding
An outline of the Python code is:
mystr='hello' jum = 3 import sys def jump(s,n): length=len(s) str='' counter = 0 ptr=0 while (counter<length): ptr=(ptr) % length str = str + s[ptr] counter = counter + 1 ptr = ptr + n return str print jump(mystr,jum)