Enum Class PowerAuthVersion
- All Implemented Interfaces:
Serializable,Comparable<PowerAuthVersion>,Constable
PowerAuth protocol version enumeration
- Author:
- Lukas Lukovsky, lukas.lukovsky@wultra.com
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<PowerAuthVersion> All supported versionsstatic final PowerAuthVersionDefault versionstatic final List<PowerAuthVersion> All versions belonging to major version 3 -
Method Summary
Modifier and TypeMethodDescriptionstatic PowerAuthVersionDetects a PowerAuth version from a provided valuebooleanProvides flag whether decryption uses different non-zero initialization vector.booleanuseIv()Provides flag whether encryption uses non-zero initialization vectorbooleanProvides flag whether encryption uses temporary keys.booleanProvides flag whether encryption uses timestamp.value()static PowerAuthVersionReturns the enum constant of this class with the specified name.static PowerAuthVersion[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
V3_0
Version 3.0 -
V3_1
Version 3.1 -
V3_2
Version 3.2 -
V3_3
Version 3.3
-
-
Field Details
-
ALL_VERSIONS
All supported versions -
DEFAULT
Default version -
VERSION_3
All versions belonging to major version 3
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
useIv
public boolean useIv()Provides flag whether encryption uses non-zero initialization vectorThis feature is supported only for protocol V3.1+.
- Returns:
- Flag whether encryption uses non-zero initialization vector
-
useDifferentIvForResponse
public boolean useDifferentIvForResponse()Provides flag whether decryption uses different non-zero initialization vector.This feature is supported only for protocol V3.2+.
- Returns:
- Flag whether decryption uses different non-zero initialization vector.
-
useTimestamp
public boolean useTimestamp()Provides flag whether encryption uses timestamp.This feature is supported only for protocol V3.2+.
- Returns:
- Flag whether encryption uses timestamp
-
useTemporaryKeys
public boolean useTemporaryKeys()Provides flag whether encryption uses temporary keys.This feature is supported only for protocol V3.3.+
- Returns:
- Flag whether encryption uses temporary keys
-
value
- Returns:
- Version string value
-
fromValue
Detects a PowerAuth version from a provided value- Parameters:
value- Value to detect the version from- Returns:
- PowerAuth version enum value matching the provided value
- Throws:
IllegalStateException- When the value is not recognized as a PowerAuth version
-