Package org.mozilla.jss.crypto
Enum SymmetricKey.Usage
- java.lang.Object
-
- java.lang.Enum<SymmetricKey.Usage>
-
- org.mozilla.jss.crypto.SymmetricKey.Usage
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SymmetricKey.Usage>
- Enclosing interface:
- SymmetricKey
public static enum SymmetricKey.Usage extends java.lang.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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description long
getPKCS11Constant()
Deprecated.Usevalue()
to get PKCS #11 CKF_ value instead.int
getVal()
Deprecated.Useordinal()
instead.long
value()
Get PKCS #11 CKF_ value.static SymmetricKey.Usage
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SymmetricKey.Usage[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ENCRYPT
public static final SymmetricKey.Usage ENCRYPT
-
DECRYPT
public static final SymmetricKey.Usage DECRYPT
-
WRAP
public static final SymmetricKey.Usage WRAP
-
UNWRAP
public static final SymmetricKey.Usage UNWRAP
-
SIGN
public static final SymmetricKey.Usage SIGN
-
VERIFY
public static final SymmetricKey.Usage VERIFY
-
-
Method Detail
-
values
public static SymmetricKey.Usage[] 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 (SymmetricKey.Usage c : SymmetricKey.Usage.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SymmetricKey.Usage 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
-
getVal
@Deprecated public int getVal()
Deprecated.Useordinal()
instead.
-
value
public long value()
Get PKCS #11 CKF_ value.
-
getPKCS11Constant
@Deprecated public long getPKCS11Constant()
Deprecated.Usevalue()
to get PKCS #11 CKF_ value instead.Get PKCS #11 CKA_ value.
-
-