code: public CBORObject EncodeToCBORObject() throws CoseException {
          CBORObject obj;
          
          obj = EncodeCBORObject();
          
          if (emitTag) {
              obj = CBORObject.FromObjectAndTag(obj, messageTag.value);
          }
          
          return obj;
      }
docs: Encode the COSE message object to a CBORObject tree.  This function call will force cryptographic operations to be executed as needed.
  
  @return CBORObject representing the message.
  @throws CoseException