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

Method totp

CodenameOne/src/com/codename1/security/Otp.java:90–92  ·  view source on GitHub ↗
(byte[] secret)

Source from the content-addressed store, hash-verified

88 /// Generates a TOTP code (RFC 6238) for the current system time, using
89 /// SHA-1, 6 digits and a 30-second step.
90 public static String totp(byte[] secret) {
91 return totp(secret, System.currentTimeMillis(), 30, 6, Hash.SHA1);
92 }
93
94 /// Generates a TOTP code for the current system time with a custom digit
95 /// count and step size.

Callers 4

runOtpVectorsMethod · 0.95
invokeStatic7Method · 0.80

Calls 2

currentTimeMillisMethod · 0.95
hotpMethod · 0.95

Tested by 3

runOtpVectorsMethod · 0.76