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, getTypeMethods inherited from class com.authlete.cose.COSEObject
getProtectedHeader, getUnprotectedHeaderMethods inherited from class com.authlete.cbor.CBORItemList
encode, getItems, parse, prettify, toStringMethods 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 eitherCBORByteArrayorCBORNull.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
CBORByteArrayorCBORNull.- Returns:
- The payload.
-
getSignatures
Get the list of signatures. Items in the list areCOSESignatureinstances.- Returns:
- The list of signatures.
-
build
Build aCOSESigninstance 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
COSESigninstance built from the given CBOR data item. - Throws:
COSEException
-
build
Build aCOSESigninstance from the given object list.- Parameters:
list- A object list that representsCOSE_Sign.- Returns:
- A
COSESigninstance built from the given object list. - Throws:
COSEException
-