Package com.google.cloud.kms.v1
Enum 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 ConstantsEnum ConstantDescription[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
FieldsModifier and TypeFieldDescriptionstatic final int[CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used for AES keystatic 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 intNot 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 TypeMethodDescriptionstatic CryptoKey.CryptoKeyPurposeforNumber(int value) static com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<CryptoKey.CryptoKeyPurpose>static CryptoKey.CryptoKeyPurposevalueOf(int value) Deprecated.static CryptoKey.CryptoKeyPurposevalueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name.static CryptoKey.CryptoKeyPurposeReturns the enum constant of this type with the specified name.static CryptoKey.CryptoKeyPurpose[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CRYPTO_KEY_PURPOSE_UNSPECIFIED
Not specified.
CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0; -
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
[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
[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
[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
[CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign].
MAC = 9; -
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
[CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used for AES key
AES_WRAPPING = 11; -
UNRECOGNIZED
-
-
Field Details
-
CRYPTO_KEY_PURPOSE_UNSPECIFIED_VALUE
public static final int CRYPTO_KEY_PURPOSE_UNSPECIFIED_VALUENot 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
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
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 nameNullPointerException- if the argument is null
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
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 nameNullPointerException- if the argument is null
-
forNumber
- 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:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.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 nameNullPointerException- if the argument is null
-