simple encrypt/decrypt lib in python with private key

Viewed 52297

Is there a simple way to encrypt/decrypt a string with a key?

Something like:

key = '1234'
string =  'hello world'
encrypted_string = encrypt(key, string)
decrypt(key, encrypted_string)

I couldn't find anything simple to do that.

5 Answers
Related