(byte[] secret, long counter, int digits)
| 55 | /// - `digits`: number of decimal digits in the output (typically 6, may |
| 56 | /// be 6, 7 or 8) |
| 57 | public static String hotp(byte[] secret, long counter, int digits) { |
| 58 | return hotp(secret, counter, digits, Hash.SHA1); |
| 59 | } |
| 60 | |
| 61 | /// Generates an HOTP code with a configurable hash algorithm. Most |
| 62 | /// authenticator apps assume SHA-1; only override if the issuer publishes a |