Skip to content

hashx: Rust hook for inspecting and modifying the random number stream

Micah Elizabeth Scott requested to merge beth/tor:cargo_hashx_rng into main

This patch has no effect on the C tor build.

Adds a function hashx_rng_callback() to the hashx API, defined only when HASHX_RNG_CALLBACK is defined. This is then used in the Rust wrapper to implement a similar rng_callback().

Included some minimal test cases. This code is intented for use in cross-compatibility fuzzing tests which drive multiple implementations of hashx with the same custom Rng stream.

Signed-off-by: Micah Elizabeth Scott beth@torproject.org

Merge request reports