Package org.mozilla.jss.crypto
Enum KeyPairGeneratorSpi.Usage
- java.lang.Object
-
- java.lang.Enum<KeyPairGeneratorSpi.Usage>
-
- org.mozilla.jss.crypto.KeyPairGeneratorSpi.Usage
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<KeyPairGeneratorSpi.Usage>
- Enclosing class:
- KeyPairGeneratorSpi
public static enum KeyPairGeneratorSpi.Usage extends java.lang.Enum<KeyPairGeneratorSpi.Usage>
In PKCS #11, each keypair 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. NSS provides a way to specify a set of flags and a corresponding mask for these flags. If a specific usage is desired set the value for that usage. If it is not set, let NSS behave in it's default fashion. If a behavior is desired, also set that behavior in the mask as well as the flags.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DECRYPT
DERIVE
ENCRYPT
SIGN
SIGN_RECOVER
UNWRAP
VERIFY
VERIFY_RECOVER
WRAP
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
getVal()
Deprecated.Useordinal()
instead.long
value()
Get PKCS #11 CKF_ value.static KeyPairGeneratorSpi.Usage
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static KeyPairGeneratorSpi.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 KeyPairGeneratorSpi.Usage ENCRYPT
-
DECRYPT
public static final KeyPairGeneratorSpi.Usage DECRYPT
-
SIGN
public static final KeyPairGeneratorSpi.Usage SIGN
-
SIGN_RECOVER
public static final KeyPairGeneratorSpi.Usage SIGN_RECOVER
-
VERIFY
public static final KeyPairGeneratorSpi.Usage VERIFY
-
VERIFY_RECOVER
public static final KeyPairGeneratorSpi.Usage VERIFY_RECOVER
-
WRAP
public static final KeyPairGeneratorSpi.Usage WRAP
-
UNWRAP
public static final KeyPairGeneratorSpi.Usage UNWRAP
-
DERIVE
public static final KeyPairGeneratorSpi.Usage DERIVE
-
-
Method Detail
-
values
public static KeyPairGeneratorSpi.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 (KeyPairGeneratorSpi.Usage c : KeyPairGeneratorSpi.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 KeyPairGeneratorSpi.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.
-
-