Closed NicolasCARPi closed 5 months ago
I cleaned up the tests, too. The TestRngProvider
class inside test was tested, but there is no point to test a class that we have in tests. Tests should test the prod code, here it was doing nothing of the sort.
Maybe the last commit was a bit too hasteful. Reverted for now.
Isn't (or wasn't) it used to test if the 2FA class checked correctly for the isCryptographicallySecure
property (or something along those lines).
Yeah, looking at it again, and given that getRandomBytes()
is simply an alias to random_bytes()
, it's a bit pointless to test if f(x) == f(x)
. We call it once in the test suite, that's enough. Should I reverse the reverse commit then?
I think it's safe to throw it out, since the isCryptographicallySecure
check is no longer performed by the TwoFactorAuth
class and it has no use anymore.
Done.
and remove the openssl provider. We now rely exclusively on random_bytes(), as there are no reasons not to. Fix #121