Releases: jiripudil/otp
Releases · jiripudil/otp
2.0.0
- Bumps supported PHP versions to 8.2–8.5
Breaking Changes
-
The
TimeBasedOtpconstructor now requires an implementation ofPsr\Clock\ClockInterface$otpType = new JiriPudil\OTP\TimeBasedOTP($clock);
-
Built-in Random extension is now used for secret generation. The method now accepts an implementation of
Random\Engine:$secret = $otp->generateSecret($randomEngine);
If omitted, it defaults to a cryptographically secure PRNG, same as before, so it constitutes a breaking change only if you explicitly used a different implementation, e.g. in tests.