Package org.jpos.security
Enum ModeOfUse
- java.lang.Object
-
- java.lang.Enum<ModeOfUse>
-
- org.jpos.security.ModeOfUse
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANY
No special restrictions apply.DECONLY
The key may only be used to perform decrypt operations.DERIVE
The key may only be used to derive other keys.ENCDEC
The key may be used to perform both encrypt and decrypt operations.ENCONLY
The key may only be used to perform encrypt operations.GENONLY
The key may only be used to perform MAC generate operations.GENSIGN
The key may only be used to perform digital signature generation operations.GENVER
The key may be used to perform MAC calculation (both generate & verify) operations.KEYVAR
The key may be used to create key variants.SIGNVER
The key may be used to perform both digital signature generation and verification operations.VERONLY
The key may only be used to perform digital signature verification operations.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description char
getCode()
Get code of key use mode.java.lang.String
getName()
Get name of key use mode.java.lang.String
toString()
static ModeOfUse
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ModeOfUse
valueOfByCode(char code)
Returns the enum constant of this type with the specifiedcode
.static ModeOfUse[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ENCDEC
public static final ModeOfUse ENCDEC
The key may be used to perform both encrypt and decrypt operations.
-
GENVER
public static final ModeOfUse GENVER
The key may be used to perform MAC calculation (both generate & verify) operations.
-
DECONLY
public static final ModeOfUse DECONLY
The key may only be used to perform decrypt operations.
-
ENCONLY
public static final ModeOfUse ENCONLY
The key may only be used to perform encrypt operations.
-
GENONLY
public static final ModeOfUse GENONLY
The key may only be used to perform MAC generate operations.
-
GENSIGN
public static final ModeOfUse GENSIGN
The key may only be used to perform digital signature generation operations.
-
SIGNVER
public static final ModeOfUse SIGNVER
The key may be used to perform both digital signature generation and verification operations.
-
VERONLY
public static final ModeOfUse VERONLY
The key may only be used to perform digital signature verification operations.
-
-
Method Detail
-
values
public static ModeOfUse[] 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 (ModeOfUse c : ModeOfUse.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ModeOfUse valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getCode
public char getCode()
Get code of key use mode.- Returns:
- the character which represents code of key use mode
-
getName
public java.lang.String getName()
Get name of key use mode.- Returns:
- the name of key use mode.
-
valueOfByCode
public static ModeOfUse valueOfByCode(char code)
Returns the enum constant of this type with the specifiedcode
.- Parameters:
code
- the string must match exactly with identifier specified by ISO 8583-1:2003(E) Table A.22 — Transaction type codes- Returns:
- the enum constant with the specified processing code or
null
if unknown.
-
-