Submitted by MGA on

Forums:

Encryption is great practice with coding PLUS your grand kids might get a kick out of sending secret messages to each other.

This is not encryption but is interesting because creates ever expanding line preserving and repeating the last line!

Now for simple encryption just add a whole table of:

if c = "A" then t = t + "F"

if c = "B" then t = t + "Z"

....

until through alphabet can add lower case letters, digits, punctuation even space!

And a decoder would do just the opposite

if c = "F" then t = t + "A"

if c = "Z" then t = t + "B"

...

This is not encryption but is interesting because creates ever expanding line preserving and repeating the last line!

t = "0"

for r = 1 to 5

s = t : t = ""

for i = 1 to len(s)

c = mid(s, i, 1)

if c = "0" then t = t + "010" else t = t + "110" *'<<< build different patterns with variations here*

next

print t:?

next

pause

Now for simple encryption just add a whole table of:

if c = "A" then t = t + "F"

if c = "B" then t = t + "Z"

....

until through alphabet can add lower case letters, digits, punctuation even space!

And a decoder would do just the opposite

if c = "F" then t = t + "A"

if c = "Z" then t = t + "B"

...

- Log in to post comments

johnno56 replied on Permalink

## When I was younger I used to

When I was younger I used to solve Cryptograms with some ease. I still enjoy them but, because of lack of practice and decrepitude, they're not so easy anymore. Nonetheless, I still find encryption fascinating, and admire those that can create the algos to make it work.

Thank you for the 'flashback'.

J