Class ActivationStatusBlobInfo
java.lang.Object
io.getlime.security.powerauth.crypto.lib.model.ActivationStatusBlobInfo
Information about activation status as parsed from the blob provided by
calling /pa/activation/status end-point.
- Author:
- Petr Dvorak
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intActivation status magic value. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyteGet activation status.byteGet least significant byte from the counter.byte[]Get counter data hash.byteGet value for counter's look ahead window.byteGet current crypto protocol version.byteGet failed attempt amount.byteGet maximum allowed failed attempt count.byteGet crypto version for possible upgrade.booleanisValid()Return true in case the parsed data was valid (correctly decrypted using transport key), false otherwise.voidsetActivationStatus(byte activationStatus) Set activation status.voidsetCtrByte(byte ctrByte) Set least significant byte from the counter.voidsetCtrDataHash(byte[] ctrDataHash) Set counter data hash.voidsetCtrLookAhead(byte ctrLookAhead) Set counter's look ahead window.voidsetCurrentVersion(byte currentVersion) Set current crypto protocol version.voidsetFailedAttempts(byte failedAttempts) Set failed attempt amount.voidsetMaxFailedAttempts(byte maxFailedAttempts) Set maximum allowed failed attempt count.voidsetUpgradeVersion(byte upgradeVersion) Set crypto version for possible upgrade.voidsetValid(boolean valid) Set validity state.
-
Field Details
-
ACTIVATION_STATUS_MAGIC_VALUE
public static final int ACTIVATION_STATUS_MAGIC_VALUEActivation status magic value.- See Also:
-
-
Constructor Details
-
ActivationStatusBlobInfo
public ActivationStatusBlobInfo()
-
-
Method Details
-
isValid
public boolean isValid()Return true in case the parsed data was valid (correctly decrypted using transport key), false otherwise.- Returns:
- True in case the parsed data was valid (correctly decrypted using transport key), false otherwise.
-
setValid
public void setValid(boolean valid) Set validity state. Set this value to true in case status blob was correctly decrypted, set to false otherwise.- Parameters:
valid- True in case decryption was successful, false otherwise.
-
getActivationStatus
public byte getActivationStatus()Get activation status.- Returns:
- Activation status.
-
setActivationStatus
public void setActivationStatus(byte activationStatus) Set activation status.- Parameters:
activationStatus- Activation status.
-
getCurrentVersion
public byte getCurrentVersion()Get current crypto protocol version.- Returns:
- Current crypto protocol version.
-
setCurrentVersion
public void setCurrentVersion(byte currentVersion) Set current crypto protocol version.- Parameters:
currentVersion- Current crypto protocol version.
-
getUpgradeVersion
public byte getUpgradeVersion()Get crypto version for possible upgrade.- Returns:
- Crypto version for possible upgrade.
-
setUpgradeVersion
public void setUpgradeVersion(byte upgradeVersion) Set crypto version for possible upgrade.- Parameters:
upgradeVersion- Crypto version for possible upgrade.
-
getFailedAttempts
public byte getFailedAttempts()Get failed attempt amount.- Returns:
- Number of failed attempts.
-
setFailedAttempts
public void setFailedAttempts(byte failedAttempts) Set failed attempt amount.- Parameters:
failedAttempts- Number of failed attempts.
-
getMaxFailedAttempts
public byte getMaxFailedAttempts()Get maximum allowed failed attempt count.- Returns:
- Maximum allowed failed attempt count.
-
setMaxFailedAttempts
public void setMaxFailedAttempts(byte maxFailedAttempts) Set maximum allowed failed attempt count.- Parameters:
maxFailedAttempts- Maximum allowed failed attempt count.
-
getCtrLookAhead
public byte getCtrLookAhead()Get value for counter's look ahead window.- Returns:
- Counter's look ahead window value.
-
setCtrLookAhead
public void setCtrLookAhead(byte ctrLookAhead) Set counter's look ahead window.- Parameters:
ctrLookAhead- Look ahead window.
-
getCtrByte
public byte getCtrByte()Get least significant byte from the counter.- Returns:
- Least significant byte from the counter.
-
setCtrByte
public void setCtrByte(byte ctrByte) Set least significant byte from the counter.- Parameters:
ctrByte- Least significant byte from the counter.
-
getCtrDataHash
public byte[] getCtrDataHash()Get counter data hash.- Returns:
- Counter data hash.
-
setCtrDataHash
public void setCtrDataHash(byte[] ctrDataHash) Set counter data hash.- Parameters:
ctrDataHash- Counter data.
-