forgerock-authenticator
4.4.0
forgerock-authenticator
/
org.forgerock.android.auth
/
OathCodeGenerator
Oath
Code
Generator
open
class
OathCodeGenerator
This singleton is an utility used to generate TOTP and HOTP tokens for registered accounts.
Members
Constructors
Oath
Code
Generator
Link copied to clipboard
private
constructor
(
storageClient
:
StorageClient
)
Private constructor restricted to this class itself
Properties
INSTANCE
Link copied to clipboard
private
open
var
INSTANCE
:
OathCodeGenerator
storage
Client
Link copied to clipboard
private
open
var
storageClient
:
StorageClient
StorageClient to persist OathMechanism updates
TAG
Link copied to clipboard
private
val
TAG
:
String
Functions
generate
Next
Code
Link copied to clipboard
open
fun
generateNextCode
(
oath
:
OathMechanism
,
timeKeeper
:
TimeKeeper
)
:
OathTokenCode
Generates a new set of codes for this token.
get
Instance
Link copied to clipboard
open
fun
getInstance
(
)
:
OathCodeGenerator
Return the OathCodeGenerator instance
open
fun
getInstance
(
storageClient
:
StorageClient
)
:
OathCodeGenerator
Initialize/Return the OathCodeGenerator instance
get
OTP
Link copied to clipboard
private
open
fun
getOTP
(
counter
:
Long
,
digits
:
Int
,
secretStr
:
String
,
algo
:
String
)
:
String
Compute new OTP code
reset
Link copied to clipboard
open
fun
reset
(
)