ValueError: Error 3 while encrypting in ECB mode
Ho Yeung Lee
jobmattcon at gmail.com
Sun Oct 29 22:20:31 EDT 2017
>>> 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
More information about the Python-list
mailing list