Package com.google.cloud.kms.v1
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 enumgoogle.cloud.kms.v1.CryptoKey.CryptoKeyPurpose
-
-
Enum Constant Summary
Enum Constants Enum Constant Description 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_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].CRYPTO_KEY_PURPOSE_UNSPECIFIED
Not specified.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].MAC
[CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign].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].UNRECOGNIZED
-
Field Summary
Fields Modifier and Type Field Description static 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].static 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].static int
CRYPTO_KEY_PURPOSE_UNSPECIFIED_VALUE
Not specified.static 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].static int
MAC_VALUE
[CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign].static 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].
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static CryptoKey.CryptoKeyPurpose
forNumber(int value)
static com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor()
com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType()
int
getNumber()
com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor()
static com.google.protobuf.Internal.EnumLiteMap<CryptoKey.CryptoKeyPurpose>
internalGetValueMap()
static CryptoKey.CryptoKeyPurpose
valueOf(int value)
Deprecated.static CryptoKey.CryptoKeyPurpose
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Returns the enum constant of this type with the specified name.static CryptoKey.CryptoKeyPurpose
valueOf(String name)
Returns 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 Detail
-
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;
-
UNRECOGNIZED
public static final CryptoKey.CryptoKeyPurpose UNRECOGNIZED
-
-
Field Detail
-
CRYPTO_KEY_PURPOSE_UNSPECIFIED_VALUE
public static final int CRYPTO_KEY_PURPOSE_UNSPECIFIED_VALUE
Not specified.
CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0;
- See Also:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
-
Method Detail
-
values
public static CryptoKey.CryptoKeyPurpose[] 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 (CryptoKey.CryptoKeyPurpose c : CryptoKey.CryptoKeyPurpose.values()) System.out.println(c);
- 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 nameNullPointerException
- if the argument is null
-
getNumber
public final int getNumber()
- Specified by:
getNumber
in interfacecom.google.protobuf.Internal.EnumLite
- Specified by:
getNumber
in interfacecom.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 nameNullPointerException
- 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 interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static final 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
-
-