Postgres:
Code:
SELECT encode(
hmac(
E'PUT\n\n1\n1408355972\nx-amz-acl:bucket-owner-full-control\n/1/1',
'1sf235123',
'sha1'
),
'base64'
);
Result: "h9wRL15mXgwRxXjqLqhbYbnfJ7I="
Python 3
Code:
base64.encodestring(
hmac.new(
'PUT\n\n1\n1408355972\nx-amz-acl:bucket-owner-full-control\n/1/1'.encode(),
'1sf235123'.encode(),
sha1
).digest()
)
Result: "CrU1V93ggf3QE0ovq686ir/i1ss=\n"
I want to signed s3 upload request in postgres, but I can't get the right signature, I have tried a whole day T_T.
Can someone give me a help??? Thanks a lot.