Enum Class ModeOfUse

java.lang.Object
java.lang.Enum<ModeOfUse>
org.jpos.security.ModeOfUse
All Implemented Interfaces:
Serializable, Comparable<ModeOfUse>, Constable

public enum ModeOfUse extends Enum<ModeOfUse>
Defines the operation that the key contained in the key block can perform.

Each value represents byte 8 of the Keyblok Header.

  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    No special restrictions apply.
    The key may only be used to perform decrypt operations.
    The key may only be used to derive other keys.
    The key may be used to perform both encrypt and decrypt operations.
    The key may only be used to perform encrypt operations.
    The key may only be used to perform MAC generate operations.
    The key may only be used to perform digital signature generation operations.
    The key may be used to perform MAC calculation (both generate invalid input: '&' verify) operations.
    The key may be used to create key variants.
    The key may be used to perform both digital signature generation and verification operations.
    The key may only be used to perform digital signature verification operations.
  • Method Summary

    Modifier and Type
    Method
    Description
    char
    Get code of key use mode.
    Get name of key use mode.
     
    static ModeOfUse
    Returns the enum constant of this class with the specified name.
    static ModeOfUse
    valueOfByCode(char code)
    Returns the enum constant of this type with the specified code.
    static ModeOfUse[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • 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 invalid input: '&' 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.
    • ANY

      public static final ModeOfUse ANY
      No special restrictions apply.
    • 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.
    • DERIVE

      public static final ModeOfUse DERIVE
      The key may only be used to derive other keys.
    • KEYVAR

      public static final ModeOfUse KEYVAR
      The key may be used to create key variants.
  • Method Details

    • values

      public static ModeOfUse[] 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

      public static ModeOfUse valueOf(String name)
      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 name
      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 String getName()
      Get name of key use mode.
      Returns:
      the name of key use mode.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<ModeOfUse>
    • valueOfByCode

      public static ModeOfUse valueOfByCode(char code)
      Returns the enum constant of this type with the specified code.
      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.