Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/sage/crypto/mq/rijndael_gf.py: Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Dec 6, 2022
1 parent 429b372 commit 886bc1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/sage/crypto/mq/rijndael_gf.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@
from sage.matrix.constructor import matrix
from sage.matrix.constructor import column_matrix
from sage.structure.element import Element, Matrix
from sage.rings.finite_rings.finite_field_base import FiniteField as FiniteField_base
from sage.rings.finite_rings.finite_field_constructor import FiniteField
from sage.structure.sage_object import SageObject
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
Expand Down Expand Up @@ -759,7 +760,7 @@ def _GF_to_hex(self, GF):
"""
if not isinstance(GF, Matrix) and \
not isinstance(GF, list) and \
not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField)):
not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField_base)):
msg = ("keyword 'GF' must be a matrix over {0}, a list of "
"elements from {0}, or a single element from {0}")
raise TypeError(msg.format(self._F))
Expand Down Expand Up @@ -884,7 +885,7 @@ def _GF_to_bin(self, GF):
"""
if not isinstance(GF, Matrix) and \
not isinstance(GF, list) and \
not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField)):
not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField_base)):
msg = ("keyword 'GF' must be a matrix over {0}, a list of "
"elements from {0}, or a single element from {0}")
raise TypeError(msg.format(self))
Expand Down

0 comments on commit 886bc1a

Please sign in to comment.