public final class TOTPData extends Object
| Constructor and Description |
|---|
TOTPData(byte[] secret) |
TOTPData(String issuer,
String user,
byte[] secret) |
| Modifier and Type | Method and Description |
|---|---|
static TOTPData |
create() |
static TOTPData |
create(String issuer,
String user) |
static byte[] |
createSecret()
generate TOTP secret with length 20
|
String |
getIssuer() |
byte[] |
getSecret() |
String |
getSecretAsBase32()
return the secret as BASE32 string
|
String |
getSecretAsHex()
return the secret as HEX string
|
String |
getSerial()
return OTPAuth Serial
|
String |
getUrl()
return TOTP URL
|
String |
getUser() |
public TOTPData(String issuer, String user, byte[] secret)
issuer - the token issueruser - the token ownersecret - the secretpublic TOTPData(byte[] secret)
secret - the secretpublic String getIssuer()
public String getUser()
public byte[] getSecret()
public String getSecretAsHex()
public String getSecretAsBase32()
public String getUrl()
public String getSerial()
public static TOTPData create(String issuer, String user)
issuer - the token issueruser - the token ownerTOTPData with generated secret for given issuer and userpublic static byte[] createSecret()
Copyright © 2014 Taimos GmbH. All Rights Reserved.