TOTP
TOTP
public class TOTP extends Object
↳ package com.onekosmos.blockid.sdk.totp.TOTP
Utility class to work with time based OTP feature.
Constructor
public TOTP()
- Creates an object of TOTP.
Method Summary
| type | parameter | summary |
|---|---|---|
| String | getOTP() | Returns OTP. The default expiry time is 30 seconds |
| String | getRemainingSecs() | Returns remaining time after which the OTP will expire |
Method Details
getOTP
public String getOTP()
- Returns a one-time password (OTP). The generated OTP is valid for 30 seconds. If this method is called multiple times within the 30-second validity window, the same OTP value is returned.
getRemainingSecs
public long getRemainingSecs()
- Returns the remaining time, in seconds, before the OTP expires.