private String parseSignSourceData(String body, String rootNode, int indexOfRootNode) {

        //  第一个字母+长度+引号和分号
        int signDataStartIndex = indexOfRootNode + rootNode.length() + 2;
        int indexOfSign = body.indexOf("\"" + AlipayConstants.SIGN + "\"");

        if (indexOfSign < 0) {

            return null;
        }

        // 签名前-逗号
        int signDataEndIndex = indexOfSign - 1;

        return body.substring(signDataStartIndex, signDataEndIndex);
    }
private String parseSignSourceData ( String body , String rootNode , int indexOfRootNode ) { int signDataStartIndex = indexOfRootNode + rootNode . length ( ) + 2 ; int indexOfSign = body . indexOf ( "\"" + AlipayConstants . SIGN + "\"" ) ; if ( indexOfSign < 0 ) { return null ; } int signDataEndIndex = indexOfSign - 1 ; return body . substring ( signDataStartIndex , signDataEndIndex ) ; }
获取签名源串内容


@param body
@param rootNode
@param indexOfRootNode
@return