in reply to Re^2: signature problem
in thread signature problem
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;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: signature problem
by bigup401 (Pilgrim) on Sep 04, 2019 at 19:45 UTC | |
by poj (Abbot) on Sep 04, 2019 at 20:31 UTC | |
|