getHashedPayload method
Returns hashed payload
See: https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
Implementation
String getHashedPayload() {
if (bodyBytes.isEmpty) {
// precalculated SHA256 value for empty string
return 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855';
}
return sha256.convert(bodyBytes).toString();
}