Cloud KMS V1 Client - Class CryptoKeyPurpose (1.20.3)

Reference documentation and code samples for the Cloud KMS V1 Client class CryptoKeyPurpose.

CryptoKeyPurpose describes the cryptographic capabilities of a CryptoKey. A given key can only be used for the operations allowed by its purpose. For more information, see Key purposes.

Protobuf type google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose

Namespace

Google \ Cloud \ Kms \ V1 \ CryptoKey

Methods

static::name

Parameter
NameDescription
value mixed

static::value

Parameter
NameDescription
name mixed

Constants

CRYPTO_KEY_PURPOSE_UNSPECIFIED

Value: 0

Not specified.

Generated from protobuf enum CRYPTO_KEY_PURPOSE_UNSPECIFIED = 0;

ENCRYPT_DECRYPT

Value: 1

CryptoKeys with this purpose may be used with Encrypt and Decrypt.

Generated from protobuf enum ENCRYPT_DECRYPT = 1;

ASYMMETRIC_SIGN

Value: 5

CryptoKeys with this purpose may be used with AsymmetricSign and GetPublicKey.

Generated from protobuf enum ASYMMETRIC_SIGN = 5;

ASYMMETRIC_DECRYPT

Value: 6

CryptoKeys with this purpose may be used with AsymmetricDecrypt and GetPublicKey.

Generated from protobuf enum ASYMMETRIC_DECRYPT = 6;

RAW_ENCRYPT_DECRYPT

Value: 7

CryptoKeys with this purpose may be used with RawEncrypt and RawDecrypt.

This purpose is meant to be used for interoperable symmetric encryption and does not support automatic CryptoKey rotation.

Generated from protobuf enum RAW_ENCRYPT_DECRYPT = 7;

MAC

Value: 9

CryptoKeys with this purpose may be used with MacSign.

Generated from protobuf enum MAC = 9;