Enum PowerAuthVersion
java.lang.Object
java.lang.Enum<PowerAuthVersion>
io.getlime.security.powerauth.lib.cmd.consts.PowerAuthVersion
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<PowerAuthVersion>,java.lang.constant.Constable
public enum PowerAuthVersion extends java.lang.Enum<PowerAuthVersion>
PowerAuth protocol version enumeration
- Author:
- Lukas Lukovsky, lukas.lukovsky@wultra.com
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>> -
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.collect.ImmutableList<PowerAuthVersion>ALL_VERSIONSAll supported versionsstatic PowerAuthVersionDEFAULTDefault versionstatic com.google.common.collect.ImmutableList<PowerAuthVersion>VERSION_2All versions belonging to major version 2static com.google.common.collect.ImmutableList<PowerAuthVersion>VERSION_3All versions belonging to major version 3 -
Method Summary
Modifier and Type Method Description static PowerAuthVersionfromValue(java.lang.String value)Detects a PowerAuth version from a provided valuebooleanuseIv()Provides flag whether encryption uses non-zero initialization vectorjava.lang.Stringvalue()static PowerAuthVersionvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static PowerAuthVersion[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
Enum Constant Details
-
V2_0
Version 2.0 -
V2_1
Version 2.1 -
V3_0
Version 3.0 -
V3_1
Version 3.1
-
-
Field Details
-
ALL_VERSIONS
All supported versions -
DEFAULT
Default version -
VERSION_2
All versions belonging to major version 2 -
VERSION_3
All versions belonging to major version 3
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- 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
-
value
public java.lang.String 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:
java.lang.IllegalStateException- When the value is not recognized as a PowerAuth version
-