Topic: [SOLVED] TypeError: initializer for ctype 'Aes *' must...
Hi, I'm using encapsulation wolfcrypt in python in my Raspberry Pi.
I'm trying to encrypt something using aes, but I am getting this error that I can not solve.
My code:
from wolfcrypt import ciphers
vector = "1234567890abcdef";
clave = "1234567890abcdef1234567890abcdef";
texto = "hola mundo";
Aes = ciphers.Aes(clave, ciphers.MODE_CBC, vector);
Aes._set_key(ciphers._ENCRYPTION);
Error:
Traceback (most recent call last):
File "/home/pi/Desktop/probandoAes.py", line 9, in <module>
Aes._set_key(ciphers._ENCRYPTION);
File "/usr/local/lib/python2.7/dist-packages/wolfcrypt/ciphers.py", line 167, in _set_key
self._enc, self._key, len(self._key), self._IV, _ENCRYPTION)
TypeError: initializer for ctype 'Aes *' must be a cdata pointer, not NoneType
>>>
Can you offer me some help?