Enum CryptoKey.CryptoKeyPurpose

java.lang.Object
java.lang.Enum<CryptoKey.CryptoKeyPurpose>
com.google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose
All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<CryptoKey.CryptoKeyPurpose>
Enclosing class:
CryptoKey

public static enum CryptoKey.CryptoKeyPurpose extends Enum<CryptoKey.CryptoKeyPurpose> implements com.google.protobuf.ProtocolMessageEnum
 [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose]
 describes the cryptographic capabilities of a
 [CryptoKey][google.cloud.kms.v1.CryptoKey]. A given key can only be used
 for the operations allowed by its purpose. For more information, see [Key
 purposes](https://cloud.google.com/kms/docs/algorithms#key_purposes).
 
Protobuf enum google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used for AES key
    [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt] and [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
    [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign] and [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
    Not specified.
    [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
    [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] and [Decapsulate][google.cloud.kms.v1.KeyManagementService.Decapsulate].
    [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign].
    [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [RawEncrypt][google.cloud.kms.v1.KeyManagementService.RawEncrypt] and [RawDecrypt][google.cloud.kms.v1.KeyManagementService.RawDecrypt].
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used for AES key
    static final int
    [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt] and [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
    static final int
    [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign] and [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
    static final int
    Not specified.
    static final int
    [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
    static final int
    [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] and [Decapsulate][google.cloud.kms.v1.KeyManagementService.Decapsulate].
    static final int
    [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign].
    static final int
    [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [RawEncrypt][google.cloud.kms.v1.KeyManagementService.RawEncrypt] and [RawDecrypt][google.cloud.kms.v1.KeyManagementService.RawDecrypt].
  • Method Summary

    Modifier and Type
    Method
    Description
    forNumber(int value)
     
    static com.google.protobuf.Descriptors.EnumDescriptor
     
    final com.google.protobuf.Descriptors.EnumDescriptor
     
    final int
     
    final com.google.protobuf.Descriptors.EnumValueDescriptor
     
    static com.google.protobuf.Internal.EnumLiteMap<CryptoKey.CryptoKeyPurpose>
     
    valueOf(int value)
    Deprecated.
    valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
    Returns the enum constant of this type with the specified name.
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • CRYPTO_KEY_PURPOSE_UNSPECIFIED

      public static final CryptoKey.CryptoKeyPurpose CRYPTO_KEY_PURPOSE_UNSPECIFIED
       Not specified.
       
      CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0;
    • ENCRYPT_DECRYPT

      public static final CryptoKey.CryptoKeyPurpose ENCRYPT_DECRYPT
       [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
       with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and
       [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
       
      ENCRYPT_DECRYPT = 1;
    • ASYMMETRIC_SIGN

      public static final CryptoKey.CryptoKeyPurpose ASYMMETRIC_SIGN
       [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
       with
       [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign]
       and
       [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
       
      ASYMMETRIC_SIGN = 5;
    • ASYMMETRIC_DECRYPT

      public static final CryptoKey.CryptoKeyPurpose ASYMMETRIC_DECRYPT
       [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
       with
       [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt]
       and
       [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
       
      ASYMMETRIC_DECRYPT = 6;
    • RAW_ENCRYPT_DECRYPT

      public static final CryptoKey.CryptoKeyPurpose RAW_ENCRYPT_DECRYPT
       [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
       with [RawEncrypt][google.cloud.kms.v1.KeyManagementService.RawEncrypt]
       and [RawDecrypt][google.cloud.kms.v1.KeyManagementService.RawDecrypt].
       This purpose is meant to be used for interoperable symmetric
       encryption and does not support automatic CryptoKey rotation.
       
      RAW_ENCRYPT_DECRYPT = 7;
    • MAC

      public static final CryptoKey.CryptoKeyPurpose MAC
       [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
       with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign].
       
      MAC = 9;
    • KEY_ENCAPSULATION

      public static final CryptoKey.CryptoKeyPurpose KEY_ENCAPSULATION
       [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
       with
       [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]
       and [Decapsulate][google.cloud.kms.v1.KeyManagementService.Decapsulate].
       
      KEY_ENCAPSULATION = 10;
    • AES_WRAPPING

      public static final CryptoKey.CryptoKeyPurpose AES_WRAPPING
       [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
       for AES key
       
      AES_WRAPPING = 11;
    • UNRECOGNIZED

      public static final CryptoKey.CryptoKeyPurpose UNRECOGNIZED
  • Field Details

    • CRYPTO_KEY_PURPOSE_UNSPECIFIED_VALUE

      public static final int CRYPTO_KEY_PURPOSE_UNSPECIFIED_VALUE
       Not specified.
       
      CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0;
      See Also:
    • ENCRYPT_DECRYPT_VALUE

      public static final int ENCRYPT_DECRYPT_VALUE
       [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
       with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and
       [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
       
      ENCRYPT_DECRYPT = 1;
      See Also:
    • ASYMMETRIC_SIGN_VALUE

      public static final int ASYMMETRIC_SIGN_VALUE
       [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
       with
       [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign]
       and
       [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
       
      ASYMMETRIC_SIGN = 5;
      See Also:
    • ASYMMETRIC_DECRYPT_VALUE

      public static final int ASYMMETRIC_DECRYPT_VALUE
       [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
       with
       [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt]
       and
       [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
       
      ASYMMETRIC_DECRYPT = 6;
      See Also:
    • RAW_ENCRYPT_DECRYPT_VALUE

      public static final int RAW_ENCRYPT_DECRYPT_VALUE
       [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
       with [RawEncrypt][google.cloud.kms.v1.KeyManagementService.RawEncrypt]
       and [RawDecrypt][google.cloud.kms.v1.KeyManagementService.RawDecrypt].
       This purpose is meant to be used for interoperable symmetric
       encryption and does not support automatic CryptoKey rotation.
       
      RAW_ENCRYPT_DECRYPT = 7;
      See Also:
    • MAC_VALUE

      public static final int MAC_VALUE
       [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
       with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign].
       
      MAC = 9;
      See Also:
    • KEY_ENCAPSULATION_VALUE

      public static final int KEY_ENCAPSULATION_VALUE
       [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
       with
       [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey]
       and [Decapsulate][google.cloud.kms.v1.KeyManagementService.Decapsulate].
       
      KEY_ENCAPSULATION = 10;
      See Also:
    • AES_WRAPPING_VALUE

      public static final int AES_WRAPPING_VALUE
       [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
       for AES key
       
      AES_WRAPPING = 11;
      See Also:
  • Method Details

    • values

      public static CryptoKey.CryptoKeyPurpose[] 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 CryptoKey.CryptoKeyPurpose 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
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static CryptoKey.CryptoKeyPurpose valueOf(int value)
      Deprecated.
      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:
      value - 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
    • forNumber

      public static CryptoKey.CryptoKeyPurpose forNumber(int value)
      Parameters:
      value - The numeric wire value of the corresponding enum entry.
      Returns:
      The enum associated with the given numeric wire value.
    • internalGetValueMap

      public static com.google.protobuf.Internal.EnumLiteMap<CryptoKey.CryptoKeyPurpose> internalGetValueMap()
    • getValueDescriptor

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
      Specified by:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptor

      public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
    • valueOf

      public static CryptoKey.CryptoKeyPurpose valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
      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:
      desc - 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