Package org.mozilla.jss.crypto
Enum Class SymmetricKey.Usage
- All Implemented Interfaces:
Serializable
,Comparable<SymmetricKey.Usage>
,Constable
- Enclosing interface:
SymmetricKey
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
Deprecated.int
getVal()
Deprecated.Useordinal()
instead.long
value()
Get PKCS #11 CKF_ value.static SymmetricKey.Usage
Returns the enum constant of this class with the specified name.static SymmetricKey.Usage[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ENCRYPT
-
DECRYPT
-
WRAP
-
UNWRAP
-
SIGN
-
VERIFY
-
-
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
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
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 nameNullPointerException
- if the argument is null
-
getVal
Deprecated.Useordinal()
instead. -
value
public long value()Get PKCS #11 CKF_ value. -
getPKCS11Constant
Deprecated.Usevalue()
to get PKCS #11 CKF_ value instead.Get PKCS #11 CKA_ value.
-
value()
to get PKCS #11 CKF_ value instead.