Class CryptoKey (3.48.0)

public final class CryptoKey extends GeneratedMessageV3 implements CryptoKeyOrBuilder

This is a data encryption key (DEK) (as opposed to a key encryption key (KEK) stored by Cloud Key Management Service (Cloud KMS). When using Cloud KMS to wrap or unwrap a DEK, be sure to set an appropriate IAM policy on the KEK to ensure an attacker cannot unwrap the DEK.

Protobuf type google.privacy.dlp.v2.CryptoKey

Implements

CryptoKeyOrBuilder

Static Fields

KMS_WRAPPED_FIELD_NUMBER

public static final int KMS_WRAPPED_FIELD_NUMBER
Field Value
Type Description
int

TRANSIENT_FIELD_NUMBER

public static final int TRANSIENT_FIELD_NUMBER
Field Value
Type Description
int

UNWRAPPED_FIELD_NUMBER

public static final int UNWRAPPED_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CryptoKey getDefaultInstance()
Returns
Type Description
CryptoKey

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static CryptoKey.Builder newBuilder()
Returns
Type Description
CryptoKey.Builder

newBuilder(CryptoKey prototype)

public static CryptoKey.Builder newBuilder(CryptoKey prototype)
Parameter
Name Description
prototype CryptoKey
Returns
Type Description
CryptoKey.Builder

parseDelimitedFrom(InputStream input)

public static CryptoKey parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CryptoKey
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CryptoKey
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static CryptoKey parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
CryptoKey
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CryptoKey
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CryptoKey parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
CryptoKey
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CryptoKey
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CryptoKey parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
CryptoKey
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CryptoKey
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static CryptoKey parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CryptoKey
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CryptoKey
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static CryptoKey parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
CryptoKey
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CryptoKey
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<CryptoKey> parser()
Returns
Type Description
Parser<CryptoKey>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public CryptoKey getDefaultInstanceForType()
Returns
Type Description
CryptoKey

getKmsWrapped()

public KmsWrappedCryptoKey getKmsWrapped()

Key wrapped using Cloud KMS

.google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3;

Returns
Type Description
KmsWrappedCryptoKey

The kmsWrapped.

getKmsWrappedOrBuilder()

public KmsWrappedCryptoKeyOrBuilder getKmsWrappedOrBuilder()

Key wrapped using Cloud KMS

.google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3;

Returns
Type Description
KmsWrappedCryptoKeyOrBuilder

getParserForType()

public Parser<CryptoKey> getParserForType()
Returns
Type Description
Parser<CryptoKey>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSourceCase()

public CryptoKey.SourceCase getSourceCase()
Returns
Type Description
CryptoKey.SourceCase

getTransient()

public TransientCryptoKey getTransient()

Transient crypto key

.google.privacy.dlp.v2.TransientCryptoKey transient = 1;

Returns
Type Description
TransientCryptoKey

The transient.

getTransientOrBuilder()

public TransientCryptoKeyOrBuilder getTransientOrBuilder()

Transient crypto key

.google.privacy.dlp.v2.TransientCryptoKey transient = 1;

Returns
Type Description
TransientCryptoKeyOrBuilder

getUnwrapped()

public UnwrappedCryptoKey getUnwrapped()

Unwrapped crypto key

.google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2;

Returns
Type Description
UnwrappedCryptoKey

The unwrapped.

getUnwrappedOrBuilder()

public UnwrappedCryptoKeyOrBuilder getUnwrappedOrBuilder()

Unwrapped crypto key

.google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2;

Returns
Type Description
UnwrappedCryptoKeyOrBuilder

hasKmsWrapped()

public boolean hasKmsWrapped()

Key wrapped using Cloud KMS

.google.privacy.dlp.v2.KmsWrappedCryptoKey kms_wrapped = 3;

Returns
Type Description
boolean

Whether the kmsWrapped field is set.

hasTransient()

public boolean hasTransient()

Transient crypto key

.google.privacy.dlp.v2.TransientCryptoKey transient = 1;

Returns
Type Description
boolean

Whether the transient field is set.

hasUnwrapped()

public boolean hasUnwrapped()

Unwrapped crypto key

.google.privacy.dlp.v2.UnwrappedCryptoKey unwrapped = 2;

Returns
Type Description
boolean

Whether the unwrapped field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public CryptoKey.Builder newBuilderForType()
Returns
Type Description
CryptoKey.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CryptoKey.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CryptoKey.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public CryptoKey.Builder toBuilder()
Returns
Type Description
CryptoKey.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException