aboutsummaryrefslogtreecommitdiff
path: root/src/test/sr_commit_calc_ref.py
AgeCommit message (Collapse)Author
2019-12-12python: Add __future__ imports for python 3 compatibilityteor
Except for src/ext, which we may not want to modify. Closes ticket 32732.
2016-08-26test: Fix shared random unit test for big endianDavid Goulet
Copying the integer 42 in a char buffer has a different representation depending on the endianess of the system thus that unit test was failing on big endian system. This commit introduces a python script, like the one we have for SRV, that computes a COMMIT/REVEAL from scratch so we can use it as a test vector for our encoding unit tests. With this, we use a random value of bytes instead of a number fixing the endianess issue and making the whole test case more solid with an external tool that builds the COMMIT and REVEAL according to the spec. Fixes #19977 Signed-off-by: David Goulet <dgoulet@torproject.org>