Skip to content

Commit 9f4d1c4

Browse files
author
Matthias Koeppe
committed
src/sage/crypto/mq/rijndael_gf.py: Fix imports
1 parent 0c01403 commit 9f4d1c4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/sage/crypto/mq/rijndael_gf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@
425425
from sage.matrix.constructor import matrix
426426
from sage.matrix.constructor import column_matrix
427427
from sage.structure.element import Element, Matrix
428+
from sage.rings.finite_rings.finite_field_base import FiniteField as FiniteField_base
428429
from sage.rings.finite_rings.finite_field_constructor import FiniteField
429430
from sage.structure.sage_object import SageObject
430431
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
@@ -759,7 +760,7 @@ def _GF_to_hex(self, GF):
759760
"""
760761
if not isinstance(GF, Matrix) and \
761762
not isinstance(GF, list) and \
762-
not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField)):
763+
not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField_base)):
763764
msg = ("keyword 'GF' must be a matrix over {0}, a list of "
764765
"elements from {0}, or a single element from {0}")
765766
raise TypeError(msg.format(self._F))
@@ -884,7 +885,7 @@ def _GF_to_bin(self, GF):
884885
"""
885886
if not isinstance(GF, Matrix) and \
886887
not isinstance(GF, list) and \
887-
not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField)):
888+
not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField_base)):
888889
msg = ("keyword 'GF' must be a matrix over {0}, a list of "
889890
"elements from {0}, or a single element from {0}")
890891
raise TypeError(msg.format(self))

0 commit comments

Comments
 (0)