Class COSEEncrypt0
java.lang.Object
com.authlete.cbor.CBORItem
com.authlete.cbor.CBORItemList
com.authlete.cose.COSEObject
com.authlete.cose.COSEMessage
com.authlete.cose.COSEEncrypt0
COSE_Encrypt0
COSE_Encrypt0
is defined in 5.2. Single
Recipient Encrypted of RFC 9052 as follows.
COSE_Encrypt0 = [ Headers, ciphertext : bstr / nil, ]
- Since:
- 1.1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCOSEEncrypt0
(COSEProtectedHeader protectedHeader, COSEUnprotectedHeader unprotectedHeader, CBORItem ciphertext) A constructor with a protected header, an unprotected header and a cipher text. -
Method Summary
Modifier and TypeMethodDescriptionstatic COSEEncrypt0
Build aCOSEEncrypt0
instance from the given CBOR data item.static COSEEncrypt0
Build aCOSEEncrypt0
instance from the given object list.Get the cipher text.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
-
COSEEncrypt0
public COSEEncrypt0(COSEProtectedHeader protectedHeader, COSEUnprotectedHeader unprotectedHeader, CBORItem ciphertext) A constructor with a protected header, an unprotected header and a cipher text.- Parameters:
protectedHeader
- A protected header. Must not be null.unprotectedHeader
- An unprotected header. Must not be null.ciphertext
- A cipher text. Must be eitherCBORByteArray
orCBORNull
.
-
-
Method Details
-
getCiphertext
Get the cipher text.The type of the value is
CBORByteArray
orCBORNull
.- Returns:
- The cipher text.
-
build
Build aCOSEEncrypt0
instance from the given CBOR data item. The data item must be a CBOR array.- Parameters:
item
- A CBOR data item that representsCOSE_Encrypt0
.- Returns:
- A
COSEEncrypt0
instance built from the given CBOR data item. - Throws:
COSEException
-
build
Build aCOSEEncrypt0
instance from the given object list.- Parameters:
list
- A object list that representsCOSE_Encrypt0
.- Returns:
- A
COSEEncrypt0
instance built from the given object list. - Throws:
COSEException
-