>>> from Crypto.Cipher import AES
>>>
>>> key = 'mysecretpassword'
>>> plaintext = 'Secret Message A'
>>> encobj = AES.new(key, AES.MODE_ECB)
>>> ciphertext = encobj.encrypt("hello")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\Crypto\Cipher\_mode_ecb.py", line 124, in 
encrypt
    raise ValueError("Error %d while encrypting in ECB mode" % result)
ValueError: Error 3 while encrypting in ECB mode
>>> ciphertext = encobj.encrypt("hellojalsdjflkdsjflds")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\Crypto\Cipher\_mode_ecb.py", line 124, in 
encrypt
    raise ValueError("Error %d while encrypting in ECB mode" % result)
ValueError: Error 3 while encrypting in ECB mode
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to