]> git.codecow.com Git - Monocypher.git/commitdiff
Fixed Python 3.10 deprecation warning
authorLoup Vaillant <loup@loup-vaillant.fr>
Tue, 11 Jan 2022 01:03:53 +0000 (02:03 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Tue, 11 Jan 2022 01:04:22 +0000 (02:04 +0100)
The randrange function will soon only accept integer arguments,
so I switched to integer division.

tests/gen/elligator-direct.py

index 8b9b253d8b8015ff9f233595c19c10cdd0a34819..a0d38e2f3852b9e9b721557eaee8763c676022ff 100755 (executable)
@@ -81,4 +81,4 @@ direct(fe(0), 3) # representative 0 maps to point (0, 0)
 seed(12345)
 
 for i in range(50):
-    direct(fe(randrange(0, (p-1)/2)), i % 4)
+    direct(fe(randrange(0, (p-1)//2)), i % 4)