I just merged #341 but after talking with @boxdot the correct change is to do the opposite: make sure we use whatever the library user provide as CSPRNG.
Note: the csprng: &mut R is supposed to be at the end of function parameters to mimick what libsignal does and make it consistent.
There are only two places where we still use rand::thread_rng: in tests and when generating an ID for the next websocket request.
I just merged #341 but after talking with @boxdot the correct change is to do the opposite: make sure we use whatever the library user provide as CSPRNG.
Note: the
csprng: &mut R
is supposed to be at the end of function parameters to mimick whatlibsignal
does and make it consistent.There are only two places where we still use
rand::thread_rng
: in tests and when generating an ID for the next websocket request.