tablestore/src/main/java/com/alicloud/openservices/tablestore/core/auth/V2SignatureMaker.java [16:35]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        this.credentials = credentials;
    }

    public String getSignature(byte[] accessKey, String action, String method, Header[] headers) throws UnsupportedEncodingException {
        StringBuilder canonicalizedOtsHeader = new StringBuilder(1000);
        Map<String, String> headerMap = new TreeMap<String, String>();
        for (Header header : headers) {
            headerMap.put(header.getName(), header.getValue());
        }
        for (Map.Entry<String, String> entry : headerMap.entrySet()) {
            String key = entry.getKey();
            String val = entry.getValue().trim();
            if (key.startsWith(Constants.OTS_HEADER_PREFIX)) {
                canonicalizedOtsHeader.append(key).append(":").append(val).append("\n");
            }
        }

        StringBuilder sb = new StringBuilder(1000);
        sb.append("/").append(action).append("\n").append(method).append("\n").
                append("\n").
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tablestore/src/main/java/com/alicloud/openservices/tablestore/core/auth/V4SignatureMaker.java [16:35]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        this.credentials = credentials;
    }

    public String getSignature(byte[] accessKey, String action, String method, Header[] headers) throws UnsupportedEncodingException {
        StringBuilder canonicalizedOtsHeader = new StringBuilder(1000);
        Map<String, String> headerMap = new TreeMap<String, String>();
        for (Header header : headers) {
            headerMap.put(header.getName(), header.getValue());
        }
        for (Map.Entry<String, String> entry : headerMap.entrySet()) {
            String key = entry.getKey();
            String val = entry.getValue().trim();
            if (key.startsWith(Constants.OTS_HEADER_PREFIX)) {
                canonicalizedOtsHeader.append(key).append(":").append(val).append("\n");
            }
        }

        StringBuilder sb = new StringBuilder(1000);
        sb.append("/").append(action).append("\n").append(method).append("\n").
                append("\n").
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



