@Immutable public final class ProtoKeySerialization extends Object implements Serialization
Key object serialized with binary protobuf Serialization.
ProtoKeySerialization objects fully describe a Key object, but tailored for
protocol buffer serialization.
| Modifier and Type | Method and Description |
|---|---|
static ProtoKeySerialization |
create(String typeUrl,
com.google.protobuf.ByteString value,
KeyData.KeyMaterialType keyMaterialType,
OutputPrefixType outputPrefixType,
Integer idRequirement) |
Integer |
getIdRequirementOrNull()
The id requirement of this key.
|
KeyData.KeyMaterialType |
getKeyMaterialType()
The contents of the field key_material_type in the message
com.google.crypto.tink.proto.KeyData.
|
Bytes |
getObjectIdentifier()
The object identifier.
|
OutputPrefixType |
getOutputPrefixType()
The contents of the field output_prefix_type in the message
com.google.crypto.tink.proto.Keyset.Key.
|
String |
getTypeUrl()
The typeUrl.
|
com.google.protobuf.ByteString |
getValue()
The contents of the field value in the message com.google.crypto.tink.proto.KeyData.
|
public static ProtoKeySerialization create(String typeUrl, com.google.protobuf.ByteString value, KeyData.KeyMaterialType keyMaterialType, OutputPrefixType outputPrefixType, @Nullable Integer idRequirement) throws GeneralSecurityException
GeneralSecurityExceptionpublic com.google.protobuf.ByteString getValue()
public KeyData.KeyMaterialType getKeyMaterialType()
public OutputPrefixType getOutputPrefixType()
@Nullable public Integer getIdRequirementOrNull()
public Bytes getObjectIdentifier()
This is the UTF8 encoding of the result of "getTypeUrl".
getObjectIdentifier in interface Serializationpublic String getTypeUrl()