- Use rejection sampling to eliminate modulo bias in generate_code(). Values above the largest multiple of 1_000_000 in u32 are discarded and re-drawn (~0.02% rejection rate). - Make generate_code_is_not_deterministic test robust against the 1-in-10^6 collision chance by trying 10 pairs instead of one. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| mod.rs | ||
| pairing.rs | ||
| policy.rs | ||
| secrets.rs | ||