开发者

How make signature in Amazon S3 in C

开发者 https://www.devze.com 2023-04-10 07:49 出处:网络
I\'m writing in C, I\'m using libcurl+openSSL to send POST request. In case of A开发者_如何学Gomazon S3, I have to make signature in my request, that is formed as RFC 2104 HMAC-SHA1 from AWS Secret Ac

I'm writing in C, I'm using libcurl+openSSL to send POST request. In case of A开发者_如何学Gomazon S3, I have to make signature in my request, that is formed as RFC 2104 HMAC-SHA1 from AWS Secret Access Key. Advise, please, where can I get the implementation of that algorithm, that will suit Amazon? Is openSSL function SHA1 the one?


HMAC is a way to combine a message and a key securely using a hash function (in this case SHA1). Fortunately, OpenSSL includes an implementation of both, so you shouldn't need to touch the SHA1 function directly. See the documentation for HMAC in OpenSSL.

0

精彩评论

暂无评论...
验证码 换一张
取 消