Class COSESignature
java.lang.Object
com.authlete.cbor.CBORItem
com.authlete.cbor.CBORItemList
com.authlete.cose.COSEObject
com.authlete.cose.COSESignature
COSE_Signature
COSE_Signature is defined in 4.1. Signing
with One or More Signers of RFC 9052 as follows.
COSE_Signature = [
Headers,
signature : bstr
]
- Since:
- 1.1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCOSESignature(COSEProtectedHeader protectedHeader, COSEUnprotectedHeader unprotectedHeader, byte[] signature) A constructor with a protected header, an unprotected header and a signature.COSESignature(COSEProtectedHeader protectedHeader, COSEUnprotectedHeader unprotectedHeader, CBORByteArray signature) A constructor with a protected header, an unprotected header and a signature. -
Method Summary
Modifier and TypeMethodDescriptionstatic COSESignatureBuild aCOSESignatureinstance from the given CBOR data item.static COSESignatureBuild aCOSESignatureinstance from the given object list.Get the signature.Methods 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
-
COSESignature
public COSESignature(COSEProtectedHeader protectedHeader, COSEUnprotectedHeader unprotectedHeader, byte[] signature) A constructor with a protected header, an unprotected header and a signature.- Parameters:
protectedHeader- A protected header. Must not be null.unprotectedHeader- An unprotected header. Must not be null.signature- A signature. Must not be null.
-
COSESignature
public COSESignature(COSEProtectedHeader protectedHeader, COSEUnprotectedHeader unprotectedHeader, CBORByteArray signature) A constructor with a protected header, an unprotected header and a signature.- Parameters:
protectedHeader- A protected header. Must not be null.unprotectedHeader- An unprotected header. Must not be null.signature- A signature. Must not be null.
-
-
Method Details
-
getSignature
-
build
Build aCOSESignatureinstance from the given CBOR data item. The data item must be a CBOR array.- Parameters:
item- A CBOR data item that representsCOSE_Signature.- Returns:
- A
COSESignatureinstance built from the given CBOR data item. - Throws:
COSEException
-
build
Build aCOSESignatureinstance from the given object list.- Parameters:
list- A object list that representsCOSE_Signature.- Returns:
- A
COSESignatureinstance built from the given object list. - Throws:
COSEException
-