Interface OneTimeCodeGenerator
public interface OneTimeCodeGenerator
Port that generates the numeric codes users type.
-
Method Summary
-
Method Details
-
generate
Generates a random numeric code from a cryptographically secure source.- Parameters:
digits- number of digits, at least one.- Returns:
- the code, left-padded with zeros to exactly
digitscharacters. - Throws:
IllegalArgumentException- ifdigitsis not positive.
-