changeset 1101:b79734a2fdbf

Allow long integer exponents in pow.
author Martin Geisler <mg@daimi.au.dk>
date Tue, 17 Feb 2009 09:30:32 +0100
parents e810a006c2bf
children 3442612fee88
files viff/passive.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/viff/passive.py	Mon Feb 09 10:50:57 2009 +0100
+++ b/viff/passive.py	Tue Feb 17 09:30:32 2009 +0100
@@ -213,7 +213,7 @@
     def pow(self, share, exponent):
         """Exponentation of a share to an integer by square-and-multiply."""
 
-        assert isinstance(exponent, int), "Exponent must be an integer"
+        assert isinstance(exponent, (int, long)), "Exponent must be an integer"
         assert exponent >= 0, "Exponent must be non-negative"
 
         if exponent == 0: