What is this line doing?
What are the two 26s for?
This is where we use the ApplyShifttoASCIICodeForCharacter function
To get the encrypted text.
How do we decrypt?
The “rail fence”
T t a Jh i h r M oi s e m r ns y e s
Size = 4
The “rail fence”
T t a Jh i h r M oi s e m r ns y e s
Size = 4
The “rail fence”
T
h
i
s
i
s
t
h
e
a
r
m
y
M
r
J
o
n
e
s
Size = 4
The “rail fence”
T t a J
h i h r M o
i s e m r n
s y e
s
Size = 4
How the algorithm works
2 Counters
T t a Jh i h r M oi s e m r ns y e s
Counter one starts at the beginning and loops once only
Counter two starts at counter one and loops to the end
T t a Jh i h r M oi s e m r ns y e s
T t a J
h i h r M oi s e m r ns y e
s
For Count1 = 1 To SizeOfRailFence
While Count2 < OriginalText.Length
Count2 = Count2 + SizeOfRailFence
The rail fence

The rail fence