Package com.google.crypto.tink.internal
Class ProtoKeySerialization
- java.lang.Object
-
- com.google.crypto.tink.internal.ProtoKeySerialization
-
- All Implemented Interfaces:
Serialization
@Immutable public final class ProtoKeySerialization extends java.lang.Object implements Serialization
* Represents aKeyobject serialized with binary protobuf Serialization.ProtoKeySerializationobjects fully describe aKeyobject, but tailored for protocol buffer serialization.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ProtoKeySerializationcreate(java.lang.String typeUrl, com.google.protobuf.ByteString value, com.google.crypto.tink.proto.KeyData.KeyMaterialType keyMaterialType, com.google.crypto.tink.proto.OutputPrefixType outputPrefixType, java.lang.Integer idRequirement)java.lang.IntegergetIdRequirementOrNull()The id requirement of this key.com.google.crypto.tink.proto.KeyData.KeyMaterialTypegetKeyMaterialType()The contents of the field key_material_type in the message com.google.crypto.tink.proto.KeyData.BytesgetObjectIdentifier()The object identifier.com.google.crypto.tink.proto.OutputPrefixTypegetOutputPrefixType()The contents of the field output_prefix_type in the message com.google.crypto.tink.proto.Keyset.Key.java.lang.StringgetTypeUrl()The typeUrl.com.google.protobuf.ByteStringgetValue()The contents of the field value in the message com.google.crypto.tink.proto.KeyData.
-
-
-
Method Detail
-
create
public static ProtoKeySerialization create(java.lang.String typeUrl, com.google.protobuf.ByteString value, com.google.crypto.tink.proto.KeyData.KeyMaterialType keyMaterialType, com.google.crypto.tink.proto.OutputPrefixType outputPrefixType, @Nullable java.lang.Integer idRequirement) throws java.security.GeneralSecurityException
- Throws:
java.security.GeneralSecurityException
-
getValue
public com.google.protobuf.ByteString getValue()
The contents of the field value in the message com.google.crypto.tink.proto.KeyData.
-
getKeyMaterialType
public com.google.crypto.tink.proto.KeyData.KeyMaterialType getKeyMaterialType()
The contents of the field key_material_type in the message com.google.crypto.tink.proto.KeyData.
-
getOutputPrefixType
public com.google.crypto.tink.proto.OutputPrefixType getOutputPrefixType()
The contents of the field output_prefix_type in the message com.google.crypto.tink.proto.Keyset.Key.
-
getIdRequirementOrNull
@Nullable public java.lang.Integer getIdRequirementOrNull()
The id requirement of this key. Guaranteed to be null if getOutputPrefixType == RAW, otherwise non-null, and equal to the ID this key has to have.
-
getObjectIdentifier
public Bytes getObjectIdentifier()
The object identifier.This is the UTF8 encoding of the result of "getTypeUrl".
- Specified by:
getObjectIdentifierin interfaceSerialization
-
getTypeUrl
public java.lang.String getTypeUrl()
The typeUrl.
-
-