Class CoseSign1_Object.CoseSign1_ObjectBuilder

    • Constructor Detail

      • CoseSign1_ObjectBuilder

        public CoseSign1_ObjectBuilder()
        Default constructor.
    • Method Detail

      • build

        public CoseSign1_Object build()
        Builds the Cose_Sign1 object.
        Returns:
        a Cose_Sign1 object
      • protectedAttribute

        public CoseSign1_Object.CoseSign1_ObjectBuilder protectedAttribute​(com.upokecenter.cbor.CBORObject label,
                                                                           com.upokecenter.cbor.CBORObject value)
        Adds a protected attribute.
        Parameters:
        label - the attribute label
        value - the attribute value
        Returns:
        the builder
      • unprotectedAttribute

        public CoseSign1_Object.CoseSign1_ObjectBuilder unprotectedAttribute​(com.upokecenter.cbor.CBORObject label,
                                                                             com.upokecenter.cbor.CBORObject value)
        Adds an unprotected attribute.
        Parameters:
        label - the attribute label
        value - the attribute value
        Returns:
        the builder
      • content

        public CoseSign1_Object.CoseSign1_ObjectBuilder content​(byte[] content)
        Assigns the payload/content (usually a CWT).
        Parameters:
        content - the binary representation of the payload
        Returns:
        the builder
      • includeMessageTag

        public CoseSign1_Object.CoseSign1_ObjectBuilder includeMessageTag​(boolean include)
        Tells whether to include the COSE_Sign1 message tag in encodings. The default is false
        Parameters:
        include - whether to include the message tag
        Returns:
        the builder