From: Loup Vaillant Date: Mon, 17 Feb 2020 10:41:22 +0000 (+0100) Subject: Python 3 compatible print calls for SAGE X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=d7bfd799b2cdcd11b922cb717a7bf0437e696b20;p=Monocypher.git Python 3 compatible print calls for SAGE --- diff --git a/tests/gen/elligator.sage b/tests/gen/elligator.sage index 08d1cea..778be11 100755 --- a/tests/gen/elligator.sage +++ b/tests/gen/elligator.sage @@ -20,7 +20,7 @@ def print_little(n): else : str += hex(byte) m //= 256 if m != 0: raise ValueError('number is too big!!') - print str + ':' + print(str + ':') def exp(a, b): """ @@ -136,18 +136,18 @@ def full_cycle_check(scalar): print_little(uv[0]) print_little(uv[1]) if h == None: - print '00:' # Failure - print '00:' # dummy value for the hash + print('00:') # Failure + print('00:') # dummy value for the hash else: - print '01:' # Success + print('01:') # Success print_little(h) # actual value for the hash c = hash_to_curve(h) if c != uv: - print 'Round trip failure' + print('Round trip failure') private = 0 for v in range(20): for i in range(32): private += (v+i) * 2^(8*i) - print '' + print('') full_cycle_check(private)