#!/usr/bin/env Python

letterMap = "abcdefghijklmnopqrstuvwxyz !"
letterMap = letterMap + letterMap
offset = 5

def encrypLetter(letter):
  offsetIndex = letterMap.index(letter) + offset
  return letterMap[offsetIndex]

def decrypLetter(letter):
  offsetIndex = letterMap.index(letter) - offset
  return letterMap[offsetIndex]

def encryptMessage(message):
  result = ""
  for letter in message:
     result = result + encrypLetter(letter)
  return result

def decryptMessage(message):
  result = ""
  for letter in message:
     result = result + decrypLetter(letter)
  return result

message = "hi ben!"
encryptedMessage = encryptMessage(message)
decryptedMessage = decryptMessage(encryptedMessage)

print "Message:   {0}".format(message)
print "Encrypted: {0}".format(encryptedMessage)
print "Decrypted: {0}".format(decryptedMessage)

40876a66fc29edc8ad36738c2b2ef1ed80bb2715
#!/usr/bin/env Python

letterMap = "abcdefghijklmnopqrstuvwxyz !"
letterMap = letterMap + letterMap
offset = 5

def encrypLetter(letter):
  offsetIndex = letterMap.index(letter) + offset
  return letterMap[offsetIndex]

def decrypLetter(letter):
  offsetIndex = letterMap.index(letter) - offset
  return letterMap[offsetIndex]

def encryptMessage(message):
  result = ""
  for letter in message:
     result = result + encrypLetter(letter)
  return result

def decryptMessage(message):
  result = ""
  for letter in message:
     result = result + decrypLetter(letter)
  return result

message = "hi ben!"
encryptedMessage = encryptMessage(message)
decryptedMessage = decryptMessage(encryptedMessage)

print "Message:   {0}".format(message)
print "Encrypted: {0}".format(encryptedMessage)
print "Decrypted: {0}".format(decryptedMessage)
