Skip to content

Instantly share code, notes, and snippets.

@RickCarlino
Created August 11, 2013 06:27
Show Gist options
  • Save RickCarlino/6203679 to your computer and use it in GitHub Desktop.
Save RickCarlino/6203679 to your computer and use it in GitHub Desktop.
encryption = (plain_text, key) ->
# Note: plain_text and key must be the same length
return if plain_text.length != > key.length
a = []
b = []
c = []
d = []
for char in w1
a.push char.charCodeAt(0)
for char in w2
b.push char.charCodeAt(0)
for i in [0..(w1.length - 1)]
c.push (a[i] + b[i]) % 127
# Need to add function to loop over each ascii number in n and generate the encrypted string ;)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment