When creating a HttpRequestMessage with a binary payload the Sign method currently reads this content and assumes it is a UTF-8 encoded string. This would then cause issues if one was to use this signing method for a 'PUT' request via an API Gateway.
My changes include modification to the Hash function's parameters to take a byte array as well as reading the content also as a byte array.
The aggregated canonical_request is then encoded to UTF-8 before being hashed.
When creating a
HttpRequestMessage
with a binary payload theSign
method currently reads this content and assumes it is a UTF-8 encoded string. This would then cause issues if one was to use this signing method for a 'PUT' request via an API Gateway.My changes include modification to the
Hash
function's parameters to take a byte array as well as reading the content also as a byte array.The aggregated
canonical_request
is then encoded to UTF-8 before being hashed.