Enum KeyUsage

java.lang.Object
java.lang.Enum<KeyUsage>
software.amazon.awscdk.services.kms.KeyUsage
All Implemented Interfaces:
Serializable, Comparable<KeyUsage>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-09-11T18:01:17.904Z") @Stability(Stable) public enum KeyUsage extends Enum<KeyUsage>
The key usage, represents the cryptographic operations of keys.

Example:

 Key key = Key.Builder.create(this, "MyKey")
         .keySpec(KeySpec.ECC_SECG_P256K1) // Default to SYMMETRIC_DEFAULT
         .keyUsage(KeyUsage.SIGN_VERIFY)
         .build();
 
  • Enum Constant Details

    • ENCRYPT_DECRYPT

      @Stability(Stable) public static final KeyUsage ENCRYPT_DECRYPT
      Encryption and decryption.
    • SIGN_VERIFY

      @Stability(Stable) public static final KeyUsage SIGN_VERIFY
      Signing and verification.
    • GENERATE_VERIFY_MAC

      @Stability(Stable) public static final KeyUsage GENERATE_VERIFY_MAC
      Generating and verifying MACs.
  • Method Details

    • values

      public static KeyUsage[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static KeyUsage valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null