Enum Class SymmetricKey.Usage

java.lang.Object
java.lang.Enum<SymmetricKey.Usage>
org.mozilla.jss.crypto.SymmetricKey.Usage
All Implemented Interfaces:
Serializable, Comparable<SymmetricKey.Usage>, Constable
Enclosing interface:
SymmetricKey

public static enum SymmetricKey.Usage extends Enum<SymmetricKey.Usage>
In PKCS #11, each key can be marked with the operations it will be used to perform. Some tokens require that a key be marked for an operation before the key can be used to perform that operation; other tokens don't care.

When you unwrap a symmetric key, you must specify which one of these operations it will be used to perform.

  • Enum Constant Details

  • Field Details

    • value

      private final long value
    • cka_value

      private final long cka_value
  • Constructor Details

    • Usage

      private Usage(long value, long cka_value)
  • Method Details

    • values

      public static SymmetricKey.Usage[] 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 SymmetricKey.Usage 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
    • getVal

      @Deprecated public int getVal()
      Deprecated.
      Use ordinal() instead.
    • value

      public long value()
      Get PKCS #11 CKF_ value.
    • getPKCS11Constant

      @Deprecated public long getPKCS11Constant()
      Deprecated.
      Use value() to get PKCS #11 CKF_ value instead.
      Get PKCS #11 CKA_ value.