Class CryptoKey (3.6.4)

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
TypeDescription
int

TRANSIENT_FIELD_NUMBER

public static final int TRANSIENT_FIELD_NUMBER
Field Value
TypeDescription
int

UNWRAPPED_FIELD_NUMBER

public static final int UNWRAPPED_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static CryptoKey getDefaultInstance()
Returns
TypeDescription
CryptoKey

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static CryptoKey.Builder newBuilder()
Returns
TypeDescription
CryptoKey.Builder

newBuilder(CryptoKey prototype)

public static CryptoKey.Builder newBuilder(CryptoKey prototype)
Parameter
NameDescription
prototypeCryptoKey
Returns
TypeDescription
CryptoKey.Builder

parseDelimitedFrom(InputStream input)

public static CryptoKey parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static CryptoKey parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CryptoKey parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CryptoKey parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static CryptoKey parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static CryptoKey parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CryptoKey parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CryptoKey
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<CryptoKey> parser()
Returns
TypeDescription
Parser<CryptoKey>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public CryptoKey getDefaultInstanceForType()
Returns
TypeDescription
CryptoKey

getKmsWrapped()

public KmsWrappedCryptoKey getKmsWrapped()

Key wrapped using Cloud KMS

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

Returns
TypeDescription
KmsWrappedCryptoKey

The kmsWrapped.

getKmsWrappedOrBuilder()

public KmsWrappedCryptoKeyOrBuilder getKmsWrappedOrBuilder()

Key wrapped using Cloud KMS

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

Returns
TypeDescription
KmsWrappedCryptoKeyOrBuilder

getParserForType()

public Parser<CryptoKey> getParserForType()
Returns
TypeDescription
Parser<CryptoKey>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSourceCase()

public CryptoKey.SourceCase getSourceCase()
Returns
TypeDescription
CryptoKey.SourceCase

getTransient()

public TransientCryptoKey getTransient()

Transient crypto key

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

Returns
TypeDescription
TransientCryptoKey

The transient.

getTransientOrBuilder()

public TransientCryptoKeyOrBuilder getTransientOrBuilder()

Transient crypto key

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

Returns
TypeDescription
TransientCryptoKeyOrBuilder

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getUnwrapped()

public UnwrappedCryptoKey getUnwrapped()

Unwrapped crypto key

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

Returns
TypeDescription
UnwrappedCryptoKey

The unwrapped.

getUnwrappedOrBuilder()

public UnwrappedCryptoKeyOrBuilder getUnwrappedOrBuilder()

Unwrapped crypto key

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

Returns
TypeDescription
UnwrappedCryptoKeyOrBuilder

hasKmsWrapped()

public boolean hasKmsWrapped()

Key wrapped using Cloud KMS

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

Returns
TypeDescription
boolean

Whether the kmsWrapped field is set.

hasTransient()

public boolean hasTransient()

Transient crypto key

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

Returns
TypeDescription
boolean

Whether the transient field is set.

hasUnwrapped()

public boolean hasUnwrapped()

Unwrapped crypto key

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

Returns
TypeDescription
boolean

Whether the unwrapped field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public CryptoKey.Builder newBuilderForType()
Returns
TypeDescription
CryptoKey.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CryptoKey.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
CryptoKey.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public CryptoKey.Builder toBuilder()
Returns
TypeDescription
CryptoKey.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException