Package com.google.crypto.tink
Class ProtoKeySerialization
- java.lang.Object
-
- com.google.crypto.tink.ProtoKeySerialization
-
@Immutable public final class ProtoKeySerialization extends java.lang.ObjectA representation of aKeyobject, prepared for the Tink proto keyset format.ProtoKeySerializationobjects fully describe aKeyobject, but they are such that theTinkProtoKeysetFormatcan be easily obtained from it.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProtoKeySerialization.KeyMaterialTypeAn enum describing the key material type.static classProtoKeySerialization.OutputPrefixTypeAn enum describing the how to prefix signatures and ciphertexts.
-
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, ProtoKeySerialization.KeyMaterialType keyMaterialType, ProtoKeySerialization.OutputPrefixType outputPrefixType, java.lang.Integer idRequirement)Creates new ProtoKeySerialization objects.java.lang.IntegergetIdRequirementOrNull()ProtoKeySerialization.KeyMaterialTypegetKeyMaterialType()ProtoKeySerialization.OutputPrefixTypegetOutputPrefixType()java.lang.StringgetTypeUrl()com.google.protobuf.ByteStringgetValue()
-
-
-
Method Detail
-
create
public static ProtoKeySerialization create(java.lang.String typeUrl, com.google.protobuf.ByteString value, ProtoKeySerialization.KeyMaterialType keyMaterialType, ProtoKeySerialization.OutputPrefixType outputPrefixType, @Nullable java.lang.Integer idRequirement) throws java.security.GeneralSecurityException
Creates new ProtoKeySerialization objects.Throws an exception if (idRequirement == null) != (outputPrefixType == RAW) or if typeUrl does not consist entirely of ASCII characters.
- Throws:
java.security.GeneralSecurityException
-
getTypeUrl
public java.lang.String getTypeUrl()
-
getValue
public com.google.protobuf.ByteString getValue()
-
getKeyMaterialType
public ProtoKeySerialization.KeyMaterialType getKeyMaterialType()
-
getOutputPrefixType
public ProtoKeySerialization.OutputPrefixType getOutputPrefixType()
-
getIdRequirementOrNull
@Nullable public java.lang.Integer getIdRequirementOrNull()
-
-