/Crippter

A simple class to scramble strings and files based on a password.

Primary LanguagePython

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'))