Class COSESign1
java.lang.Object
com.authlete.cbor.CBORItem
com.authlete.cbor.CBORItemList
com.authlete.cose.COSEObject
com.authlete.cose.COSEMessage
com.authlete.cose.COSESign1
COSE_Sign1
COSE_Sign1 is defined in 4.2. Signing
with One Signer of RFC 9052 as follows.
COSE_Sign1 = [
Headers,
payload : bstr / nil,
signature : bstr
]
- Since:
- 1.1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCOSESign1(COSEProtectedHeader protectedHeader, COSEUnprotectedHeader unprotectedHeader, CBORItem payload, CBORByteArray signature) A constructor with a protected header, an unprotected header, a payload and a signature. -
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
-
COSESign1
public COSESign1(COSEProtectedHeader protectedHeader, COSEUnprotectedHeader unprotectedHeader, CBORItem payload, CBORByteArray signature) A constructor with a protected header, an unprotected header, a payload and a signature.- Parameters:
protectedHeader- A protected header. Must not be null.unprotectedHeader- An unprotected header. Must not be null.payload- A payload. Must be eitherCBORByteArrayorCBORNull.signature- A signature. Must not be null.
-
-
Method Details
-
getPayload
Get the payload.The type of the value is
CBORByteArrayorCBORNull.- Returns:
- The payload.
-
getSignature
-
build
Build aCOSESign1instance from the given CBOR data item. The data item must be a CBOR array.- Parameters:
item- A CBOR data item that representsCOSE_Sign1.- Returns:
- A
COSESign1instance built from the given CBOR data item. - Throws:
COSEException
-
build
Build aCOSESign1instance from the given object list.- Parameters:
list- A object list that representsCOSE_Sign1.- Returns:
- A
COSESign1instance built from the given object list. - Throws:
COSEException
-