Class COSESign
java.lang.Object
com.authlete.cbor.CBORItem
com.authlete.cbor.CBORItemList
com.authlete.cose.COSEObject
com.authlete.cose.COSEMessage
com.authlete.cose.COSESign
COSE_Sign
COSE_Sign
is defined in 4.1. Signing
with One or More Signers of RFC 9052 as follows.
COSE_Sign = [ Headers, payload : bstr / nil, signatures : [+ COSE_Signature] ]
- Since:
- 1.1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCOSESign
(COSEProtectedHeader protectedHeader, COSEUnprotectedHeader unprotectedHeader, CBORItem payload, CBORItemList signatures) A constructor with a protected header, an unprotected header, a payload and signatures. -
Method Summary
Methods inherited from class com.authlete.cose.COSEMessage
getTagged, getTagNumber, getType
Methods inherited from class com.authlete.cose.COSEObject
getProtectedHeader, getUnprotectedHeader
Methods inherited from class com.authlete.cbor.CBORItemList
encode, getItems, parse, prettify, toString
Methods inherited from class com.authlete.cbor.CBORItem
encode, encodeMajorWithNumber, encodeToBase64, encodeToBase64Url, encodeToHex, getComment, prettify, setComment, toString
-
Constructor Details
-
COSESign
public COSESign(COSEProtectedHeader protectedHeader, COSEUnprotectedHeader unprotectedHeader, CBORItem payload, CBORItemList signatures) A constructor with a protected header, an unprotected header, a payload and signatures.- Parameters:
protectedHeader
- A protected header. Must not be null.unprotectedHeader
- An unprotected header. Must not be null.payload
- A payload. Must be eitherCBORByteArray
orCBORNull
.signatures
- Signatures. Must not be null. Items in the list must be instances ofCOSESignature
. At least one element must be contained.
-
-
Method Details
-
getPayload
Get the payload.The type of the value is
CBORByteArray
orCBORNull
.- Returns:
- The payload.
-
getSignatures
Get the list of signatures. Items in the list areCOSESignature
instances.- Returns:
- The list of signatures.
-
build
Build aCOSESign
instance from the given CBOR data item. The data item must be a CBOR array.- Parameters:
item
- A CBOR data item that representsCOSE_Sign
.- Returns:
- A
COSESign
instance built from the given CBOR data item. - Throws:
COSEException
-
build
Build aCOSESign
instance from the given object list.- Parameters:
list
- A object list that representsCOSE_Sign
.- Returns:
- A
COSESign
instance built from the given object list. - Throws:
COSEException
-