Driverfury

Basi Di Crittografia #3 - Codice 1

Mar 2nd, 2016
468
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def cripta(stringa, chiave):
  2.     stringaCifrata = ""
  3.     i = 0
  4.     for lettera in stringa:
  5.         stringaCifrata += chr((ord(lettera) + chiave[i]) % 128)
  6.         i += 1
  7.         if i >= len(chiave):
  8.             i = 0
  9.     return stringaCifrata
RAW Paste Data