-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
16 lines (12 loc) · 750 Bytes
/
Copy pathREADME
File metadata and controls
16 lines (12 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Crippter is a simple class to encrypt files or strings with a password.
It is neither fast nor very secure but works when the security requirements are low and the content to be encrypted is small.
Usage example:
password = "secret"
message = "This is a secret for jo jo bolonga!!!!"
crippter = Crippter(password)
encoded_message = crippter.encryptString(message)
decoded_message = Crippter(password).decryptString(encoded_message)
print "This should be true: %s\n"%(message == decoded_message)
crippter.encryptFile('pain.mp3','encrypted_pain.mp3')
crippter.decryptFile('encrypted_pain.mp3','decrypted_pain.mp3')
print "This should be Equal %s\n"%(filecmp.cmp('decrypted_pain.mp3','pain.mp3'))