Beispiel #1
0
 def _set_key(self, direction):
     if direction == _ENCRYPTION:
         return _lib.wc_AesSetKey(self._enc, self._key, len(self._key),
                                  self._IV, _ENCRYPTION)
     else:
         return _lib.wc_AesSetKey(self._dec, self._key, len(self._key),
                                  self._IV, _DECRYPTION)
Beispiel #2
0
 def _set_key(self, direction):
     if direction == _ENCRYPTION:
         return _lib.wc_AesSetKey(
             self._enc, self._key, len(self._key), self._IV, _ENCRYPTION)
     else:
         return _lib.wc_AesSetKey(
             self._dec, self._key, len(self._key), self._IV, _DECRYPTION)