code: @Override
      protected void DecodeFromCBORObject(CBORObject messageObject) throws CoseException {
          if (messageObject.size() != 4) throw new CoseException("Invalid Sign1 structure");
          
          if (messageObject.get(0).getType() == CBORType.ByteString) {
              rgbProtected = messageObject.get(0).GetByteString();
              if (messageObject.get(0).GetByteString().length == 0) objProtected = CBORObject.NewMap();
              else {
                  objProtected = CBORObject.DecodeFromBytes(rgbProtected);
                  if (objProtected.size() == 0) rgbProtected = new byte[0];
              }
          }
          else throw new CoseException("Invalid Sign1 structure");
          
          if (messageObject.get(1).getType() == CBORType.Map) {
              objUnprotected = messageObject.get(1);
          }
          else throw new CoseException("Invalid Sign1 structure");
          
          if (messageObject.get(2).getType() == CBORType.ByteString) rgbContent = messageObject.get(2).GetByteString();
          else if (!messageObject.get(2).isNull()) throw new CoseException("Invalid Sign1 structure");
          
          if (messageObject.get(3).getType() == CBORType.ByteString) rgbSignature = messageObject.get(3).GetByteString();
          else throw new CoseException("Invalid Sign1 structure");
      }
docs: Internal function used in creating a Sign1Message object from a byte string.
  
  @param messageObject COSE_Sign1 encoded object.
  @throws CoseException Errors generated by the COSE module