Package se.digg.dgc.signatures.cose
Class CoseSign1_Object.CoseSign1_ObjectBuilder
- java.lang.Object
-
- se.digg.dgc.signatures.cose.CoseSign1_Object.CoseSign1_ObjectBuilder
-
- Enclosing class:
- CoseSign1_Object
public static class CoseSign1_Object.CoseSign1_ObjectBuilder extends Object
A builder forCoseSign1_Object
objects.
-
-
Constructor Summary
Constructors Constructor Description CoseSign1_ObjectBuilder()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoseSign1_Object
build()
Builds the Cose_Sign1 object.CoseSign1_Object.CoseSign1_ObjectBuilder
content(byte[] content)
Assigns the payload/content (usually a CWT).CoseSign1_Object.CoseSign1_ObjectBuilder
includeMessageTag(boolean include)
Tells whether to include the COSE_Sign1 message tag in encodings.CoseSign1_Object.CoseSign1_ObjectBuilder
protectedAttribute(com.upokecenter.cbor.CBORObject label, com.upokecenter.cbor.CBORObject value)
Adds a protected attribute.CoseSign1_Object.CoseSign1_ObjectBuilder
unprotectedAttribute(com.upokecenter.cbor.CBORObject label, com.upokecenter.cbor.CBORObject value)
Adds an unprotected attribute.
-
-
-
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 labelvalue
- 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 labelvalue
- 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 isfalse
- Parameters:
include
- whether to include the message tag- Returns:
- the builder
-
-