Loading scared/aes/base.py +1 −1 Original line number Diff line number Diff line Loading @@ -608,7 +608,7 @@ def _parametric_cipher(state, key, operations, after_step, at_round=None, mode=' if state.ndim == 1: out_state = _np.array([_np.copy(state) for i in range(round_keys.shape[0])], dtype='uint8') else: out_state = _np.array([_np.copy(s) for s in state], dtype='uint8') out_state = _np.array(state, dtype='uint8', copy=True) for i, _round_operations in enumerate(rounds): for step, operation in enumerate(_round_operations): Loading scared/des/base.py +1 −1 Original line number Diff line number Diff line Loading @@ -800,7 +800,7 @@ class _ParametricCipher(): if state.ndim == 1: out_state = _np.array([_np.copy(state) for i in range(des_keys.shape[1])], dtype='uint8').reshape(-1, 8) else: out_state = _np.array([_np.copy(s) for s in state], dtype='uint8') out_state = _np.array(state, dtype='uint8', copy=True) self.total_words = _np.max([out_state.shape[0], des_keys.shape[1]]) for des_number, des_rounds in enumerate(des_iterations): Loading Loading
scared/aes/base.py +1 −1 Original line number Diff line number Diff line Loading @@ -608,7 +608,7 @@ def _parametric_cipher(state, key, operations, after_step, at_round=None, mode=' if state.ndim == 1: out_state = _np.array([_np.copy(state) for i in range(round_keys.shape[0])], dtype='uint8') else: out_state = _np.array([_np.copy(s) for s in state], dtype='uint8') out_state = _np.array(state, dtype='uint8', copy=True) for i, _round_operations in enumerate(rounds): for step, operation in enumerate(_round_operations): Loading
scared/des/base.py +1 −1 Original line number Diff line number Diff line Loading @@ -800,7 +800,7 @@ class _ParametricCipher(): if state.ndim == 1: out_state = _np.array([_np.copy(state) for i in range(des_keys.shape[1])], dtype='uint8').reshape(-1, 8) else: out_state = _np.array([_np.copy(s) for s in state], dtype='uint8') out_state = _np.array(state, dtype='uint8', copy=True) self.total_words = _np.max([out_state.shape[0], des_keys.shape[1]]) for des_number, des_rounds in enumerate(des_iterations): Loading