request.addParameter("SignatureMethod", algorithm.toString());
stringToSign = calculateStringToSignV2(request.getEndpoint(),
request.getParameters());
}
else {
throw new SignatureException("Invalid Signature Version specified");
}
String signatureValue = sign(stringToSign, credentials
.getAWSSecretKey(), algorithm);
request.addParameter("Signature", signatureValue);