コード例 #1
0
 def __convertState2output(self):
     anArray = _State(self.__nRows, self.__nColumns,
                      self._logLevel).toArray(self.__state)
     argout = _Long(self.__wordSize).fromArray(anArray,
                                               self.__nColumns *
                                               self.__nRows *
                                               self.__wordSize)
     self._debug_stream("argout: %s" % argout)
     return argout
コード例 #2
0
 def __convertInput2State(self, argin):
     self._debug_stream("argin: %s" % (argin))
     # TODO: check the argin have the size to be ciphered/deciphered
     anArray = _Long(self.__wordSize).toArray(argin,
                                              self.__nColumns *
                                              self.__nRows *
                                              self.__wordSize)
     self.__state = _State(self.__nRows, self.__nColumns, self._logLevel).\
         fromArray(anArray)