getOTPValue method

String getOTPValue(
  1. String secretKey,
  2. int serverTime
)

Implementation

String getOTPValue(String secretKey, int serverTime) {
  try {
    return OTP.generateTOTPCodeString(secretKey, serverTime * 1000, length: 8, interval: 30, algorithm: Algorithm.SHA512, isGoogle: true);
  } catch(e) {
    BootpayPrint(e);
    return "";
  }
}