diff options
author | Dwayne C. Litzenberger <dlitz@dlitz.net> | 2012-07-03 12:23:36 -0400 |
---|---|---|
committer | Dwayne C. Litzenberger <dlitz@dlitz.net> | 2012-07-03 12:23:36 -0400 |
commit | 07fae6821c0f2bfe04e73b30f82483ce32465e8f (patch) | |
tree | 33a25666c8557714a9f259a204aba7f211b8084c | |
parent | 3103b3789fb26d9cf9aba2d27f6458fc072ed85a (diff) | |
parent | edca4d15a53edec6a000d432f57830fd4b7ffb9b (diff) | |
download | pycrypto-07fae6821c0f2bfe04e73b30f82483ce32465e8f.tar.gz |
Merge remote-tracking branch 'aried3r/master'
Pull request: https://github.com/dlitz/pycrypto/pull/19
-rw-r--r-- | README | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -21,12 +21,12 @@ An example usage of the SHA256 module is: An example usage of an encryption algorithm (AES, in this case) is: >>> from Crypto.Cipher import AES ->>> obj = AES.new('This is a key456', AES.MODE_ECB) +>>> obj = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456') >>> message = "The answer is no" >>> ciphertext = obj.encrypt(message) >>> ciphertext -'o\x1aq_{P+\xd0\x07\xce\x89\xd1=M\x989' ->>> obj2 = AES.new('This is a key456', AES.MODE_ECB) +'\xd6\x83\x8dd!VT\x92\xaa`A\x05\xe0\x9b\x8b\xf1' +>>> obj2 = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456') >>> obj2.decrypt(ciphertext) 'The answer is no' |