MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / hotp

Method hotp

CodenameOne/src/com/codename1/security/Otp.java:57–59  ·  view source on GitHub ↗
(byte[] secret, long counter, int digits)

Source from the content-addressed store, hash-verified

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

Callers 6

totpMethod · 0.95
verifyTotpMethod · 0.95
runOtpVectorsMethod · 0.95
rfc4226_hotpAt8DigitsMethod · 0.95
invokeStatic7Method · 0.80

Calls 4

createMethod · 0.95
padMethod · 0.95
toStringMethod · 0.95
doFinalMethod · 0.80

Tested by 3

runOtpVectorsMethod · 0.76
rfc4226_hotpAt8DigitsMethod · 0.76