Skip to content

Instantly share code, notes, and snippets.

@milin
Created February 22, 2010 05:36
Show Gist options
  • Save milin/310830 to your computer and use it in GitHub Desktop.
Save milin/310830 to your computer and use it in GitHub Desktop.
encrypted_message = ""
for letter in temp:
if letter in alphabets: #if letter in temp lies in alphabet store itshash value in encypted message
encrypted_message += encrypt_table[letter]
#else store the letter as it is
else:
encrypted_message += letter
# encrypt the key
encrypted_key = ""
for keyletter in key:
if keyletter in alphabets:
encrypted_key += encrypt_table[keyletter]
else:
encrypted_key += keyletter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment