Package io.mangoo.crypto.totp
Enum OTPKey.OTPType
- java.lang.Object
-
- java.lang.Enum<OTPKey.OTPType>
-
- io.mangoo.crypto.totp.OTPKey.OTPType
-
- All Implemented Interfaces:
Serializable,Comparable<OTPKey.OTPType>
- Enclosing class:
- OTPKey
public static enum OTPKey.OTPType extends Enum<OTPKey.OTPType>
Type of One Time Password. Valid types are either HOTP or TOTP.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OTPKey.OTPTypefrom(String name)StringgetName()StringtoString()static OTPKey.OTPTypevalueOf(String name)Returns the enum constant of this type with the specified name.static OTPKey.OTPType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
HOTP
public static final OTPKey.OTPType HOTP
-
TOTP
public static final OTPKey.OTPType TOTP
-
-
Method Detail
-
values
public static OTPKey.OTPType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (OTPKey.OTPType c : OTPKey.OTPType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OTPKey.OTPType valueOf(String name)
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getName
public String getName()
-
from
public OTPKey.OTPType from(String name)
-
toString
public String toString()
- Overrides:
toStringin classEnum<OTPKey.OTPType>
-
-