@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.351Z") @Stability(value=Stable) public enum KeySpec extends Enum<KeySpec>
Example:
Key key = Key.Builder.create(this, "MyKey")
.keySpec(KeySpec.ECC_SECG_P256K1) // Default to SYMMETRIC_DEFAULT
.keyUsage(KeyUsage.SIGN_VERIFY)
.build();
| Enum Constant and Description |
|---|
ECC_NIST_P256
NIST FIPS 186-4, Section 6.4, ECDSA signature using the curve specified by the key and SHA-256 for the message digest.
|
ECC_NIST_P384
NIST FIPS 186-4, Section 6.4, ECDSA signature using the curve specified by the key and SHA-384 for the message digest.
|
ECC_NIST_P521
NIST FIPS 186-4, Section 6.4, ECDSA signature using the curve specified by the key and SHA-512 for the message digest.
|
ECC_SECG_P256K1
Standards for Efficient Cryptography 2, Section 2.4.1, ECDSA signature on the Koblitz curve.
|
RSA_2048
RSA with 2048 bits of key.
|
RSA_3072
RSA with 3072 bits of key.
|
RSA_4096
RSA with 4096 bits of key.
|
SYMMETRIC_DEFAULT
The default key spec.
|
| Modifier and Type | Method and Description |
|---|---|
static KeySpec |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static KeySpec[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Stable) public static final KeySpec SYMMETRIC_DEFAULT
Valid usage: ENCRYPT_DECRYPT
@Stability(value=Stable) public static final KeySpec RSA_2048
Valid usage: ENCRYPT_DECRYPT and SIGN_VERIFY
@Stability(value=Stable) public static final KeySpec RSA_3072
Valid usage: ENCRYPT_DECRYPT and SIGN_VERIFY
@Stability(value=Stable) public static final KeySpec RSA_4096
Valid usage: ENCRYPT_DECRYPT and SIGN_VERIFY
@Stability(value=Stable) public static final KeySpec ECC_NIST_P256
Valid usage: SIGN_VERIFY
@Stability(value=Stable) public static final KeySpec ECC_NIST_P384
Valid usage: SIGN_VERIFY
@Stability(value=Stable) public static final KeySpec ECC_NIST_P521
Valid usage: SIGN_VERIFY
@Stability(value=Stable) public static final KeySpec ECC_SECG_P256K1
Valid usage: SIGN_VERIFY
public static KeySpec[] values()
for (KeySpec c : KeySpec.values()) System.out.println(c);
public static KeySpec valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.