I said the signature is added after the calculation.
The hmac_sha1 signature requires a key. i.e. key = self.access_key_secret + '&'
Also it should be base64 encoded. Try
pojmy $string_to_sign = 'POST&%2F&'.$ua->www_form_urlencode( $data ); my $key = '<accessSecret>' . '&'; my $signature = hmac_sha1_base64($string_to_sign, $key); while (length($signature) % 4) { $signature .= '='; # padding } $data->{'Signature'} = $signature; printf "str = %s\n",$string_to_sign; printf "sig = %s\n",$signature;
In reply to Re^3: signature problem
by poj
in thread signature problem
by bigup401
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |