code: @Override
      protected CBORObject EncodeCBORObject() throws CoseException {
          if (rgbEncrypt == null) throw new CoseException("Encrypt function not called");
          
          CBORObject obj = CBORObject.NewArray();
          if (objProtected.size() > 0) obj.Add(objProtected.EncodeToBytes());
          else obj.Add(CBORObject.FromObject(new byte[0]));
          
          obj.Add(objUnprotected);
          
          if (emitContent) obj.Add(rgbEncrypt);
          else obj.Add(CBORObject.Null);
          
          return obj;
      }
docs: Internal function used to construct the CBORObject
  @return the constructed CBORObject
  @throws CoseException if the content has not yet been encrypted