public static enum CryptoKey.CryptoKeyPurpose extends Enum<CryptoKey.CryptoKeyPurpose> implements 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 and 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].
|
UNRECOGNIZED |
Modifier and Type | Field and 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].
|
Modifier and Type | Method and Description |
---|---|
static CryptoKey.CryptoKeyPurpose |
forNumber(int value) |
static Descriptors.EnumDescriptor |
getDescriptor() |
Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static Internal.EnumLiteMap<CryptoKey.CryptoKeyPurpose> |
internalGetValueMap() |
static CryptoKey.CryptoKeyPurpose |
valueOf(Descriptors.EnumValueDescriptor desc) |
static CryptoKey.CryptoKeyPurpose |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
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.
|
public static final CryptoKey.CryptoKeyPurpose CRYPTO_KEY_PURPOSE_UNSPECIFIED
Not specified.
CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0;
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;
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;
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;
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;
public static final CryptoKey.CryptoKeyPurpose UNRECOGNIZED
public static final int CRYPTO_KEY_PURPOSE_UNSPECIFIED_VALUE
Not specified.
CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0;
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;
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;
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;
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;
public static CryptoKey.CryptoKeyPurpose[] values()
for (CryptoKey.CryptoKeyPurpose c : CryptoKey.CryptoKeyPurpose.values()) System.out.println(c);
public static CryptoKey.CryptoKeyPurpose 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 nullpublic final int getNumber()
getNumber
in interface Internal.EnumLite
getNumber
in interface ProtocolMessageEnum
@Deprecated public static CryptoKey.CryptoKeyPurpose valueOf(int value)
forNumber(int)
instead.value
- The numeric wire value of the corresponding enum entry.public static CryptoKey.CryptoKeyPurpose forNumber(int value)
value
- The numeric wire value of the corresponding enum entry.public static Internal.EnumLiteMap<CryptoKey.CryptoKeyPurpose> internalGetValueMap()
public final Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor
in interface ProtocolMessageEnum
public final Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType
in interface ProtocolMessageEnum
public static final Descriptors.EnumDescriptor getDescriptor()
public static CryptoKey.CryptoKeyPurpose valueOf(Descriptors.EnumValueDescriptor desc)
Copyright © 2022 Google LLC. All rights reserved.