public static enum SymmetricKey.Usage extends java.lang.Enum<SymmetricKey.Usage>
When you unwrap a symmetric key, you must specify which one of these operations it will be used to perform.
Enum Constant and Description |
---|
DECRYPT |
ENCRYPT |
SIGN |
UNWRAP |
VERIFY |
WRAP |
Modifier and Type | Method and Description |
---|---|
long |
getPKCS11Constant()
Deprecated.
Use
value() to get PKCS #11 CKF_ value instead. |
int |
getVal()
Deprecated.
Use
ordinal() 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.
|
public static final SymmetricKey.Usage ENCRYPT
public static final SymmetricKey.Usage DECRYPT
public static final SymmetricKey.Usage WRAP
public static final SymmetricKey.Usage UNWRAP
public static final SymmetricKey.Usage SIGN
public static final SymmetricKey.Usage VERIFY
public static SymmetricKey.Usage[] values()
for (SymmetricKey.Usage c : SymmetricKey.Usage.values()) System.out.println(c);
public static SymmetricKey.Usage valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null@Deprecated public int getVal()
ordinal()
instead.public long value()
@Deprecated public long getPKCS11Constant()
value()
to get PKCS #11 CKF_ value instead.