src/main/java/com/qingstor/sdk/utils/QSSignatureUtil.java
public static String generateSignature(
            String secretKey,
            String method,
            String requestURI,
            Map<String, String> params,
            Map<String, String> headers) {
        String signature = "";
        String strToSign = getStringToSignature(method, requestURI, params, headers);
        logger.log(Level.INFO, "== String to sign ==\n" + strToSign + "\n");
        signature = generateSignature(secretKey, strToSign);
        return signature;
    }
public static String generateSignature(
            String secretKey,
            String method,
            String requestURI,
            Map<String, String> params,
            Map<String, String> headers) {
        String signature = "";
        String strToSign = getStringToSignature(method, requestURI, params, headers);
        logger.log(Level.INFO, "== String to sign ==\n" + strToSign + "\n");
        signature = generateSignature(secretKey, strToSign);
        return signature;
    }
public static String generateSignature ( String secretKey , String method , String requestURI , Map < String , String > params , Map < String , String > headers ) { String signature = "" ; String strToSign = getStringToSignature ( method , requestURI , params , headers ) ; logger . log ( Level . INFO , "== String to sign ==\n" + strToSign + "\n" ) ; signature = generateSignature ( secretKey , strToSign ) ; return signature ; }
Generate signature for request against QingStor.

@param secretKey:  API secret access key ID
@param method:     HTTP method
@param requestURI:
@param params:     HTTP request parameters
@param headers:    HTTP request headers
@return a string which can be used as value of HTTP request header field "Authorization"
directly.
<p>See <a href="https://docs.qingcloud.com/qingstor/api/common/signature.html">https://docs.qingcloud.com/qingstor/api/common/signature.html</a> for more details
about how to do signature of request against QingStor.
Generate signature for request against QingStor .