Skip to content

Releases: jiripudil/otp

2.0.0

25 Nov 14:53
2.0.0
89e001e

Choose a tag to compare

  • Bumps supported PHP versions to 8.2–8.5

Breaking Changes

  • The TimeBasedOtp constructor now requires an implementation of Psr\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.