Skip to content

Conversation

@cstockton
Copy link
Contributor

This change locks in the current behavior of GenerateOtp with unit tests. This required a small change to allow passing an io.Reader. In addition I added a TODO comment about a minor defensive change to include bounds checks, error propagation and the correct way to support larger digits.

This is in response to #2272

@cstockton cstockton requested a review from a team as a code owner December 4, 2025 22:03
Lock in the current behavior of GenerateOtp with unit tests. This
required a small change to allow passing an io.Reader. In addition
I added a TODO comment about a minor defensive change to include
bounds checks, error propagation and the correct way to support
larger digits.
@cstockton cstockton force-pushed the cs/crypto-generate-otp-tests branch from d382ca7 to 8b9c83e Compare December 4, 2025 22:08
This is a deliberate usage for deterministic outputs.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 19968396814

Details

  • 12 of 12 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 68.451%

Totals Coverage Status
Change from base Build 19871602451: 0.02%
Covered Lines: 14652
Relevant Lines: 21405

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants