Class ProtoParametersSerialization

  • All Implemented Interfaces:
    Serialization

    @Immutable
    public final class ProtoParametersSerialization
    extends java.lang.Object
    implements Serialization
    Represents a Parameters object serialized with binary protobuf Serialization.

    ProtoParametersSerialization objects fully describe a Parameters object, but tailored for protocol buffer serialization.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ProtoParametersSerialization checkedCreate​(com.google.crypto.tink.proto.KeyTemplate keyTemplate)
      Creates a new ProtoParametersSerialization object.
      static ProtoParametersSerialization create​(com.google.crypto.tink.proto.KeyTemplate keyTemplate)
      Creates a new ProtoParametersSerialization object.
      static ProtoParametersSerialization create​(java.lang.String typeUrl, com.google.crypto.tink.proto.OutputPrefixType outputPrefixType, com.google.protobuf.MessageLite value)
      Creates a new ProtoParametersSerialization object from the individual parts.
      com.google.crypto.tink.proto.KeyTemplate getKeyTemplate()
      The contents of the field value in the message com.google.crypto.tink.proto.KeyData.
      Bytes getObjectIdentifier()
      The typeUrl.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static ProtoParametersSerialization create​(java.lang.String typeUrl,
                                                          com.google.crypto.tink.proto.OutputPrefixType outputPrefixType,
                                                          com.google.protobuf.MessageLite value)
        Creates a new ProtoParametersSerialization object from the individual parts.

        Note: the given typeUrl must be valid and must not contain invalid characters.

      • create

        public static ProtoParametersSerialization create​(com.google.crypto.tink.proto.KeyTemplate keyTemplate)
        Creates a new ProtoParametersSerialization object.

        Note: the given typeUrl must be valid and may not contain invalid characters.

      • checkedCreate

        public static ProtoParametersSerialization checkedCreate​(com.google.crypto.tink.proto.KeyTemplate keyTemplate)
                                                          throws java.security.GeneralSecurityException
        Creates a new ProtoParametersSerialization object.

        If the type URL contains invalid characters, such as spaces, this throws a GeneralSecurityException

        Throws:
        java.security.GeneralSecurityException
      • getKeyTemplate

        public com.google.crypto.tink.proto.KeyTemplate getKeyTemplate()
        The contents of the field value in the message com.google.crypto.tink.proto.KeyData.