Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/updraftp.../vendor/eher/oauth/src/Eher/OAuth
File: HmacSha1.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Eher\OAuth;
[2] Fix | Delete
[3] Fix | Delete
/**
[4] Fix | Delete
* The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104]
[5] Fix | Delete
* where the Signature Base String is the text and the key is the concatenated values (each first
[6] Fix | Delete
* encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&'
[7] Fix | Delete
* character (ASCII code 38) even if empty.
[8] Fix | Delete
* - Chapter 9.2 ("HMAC-SHA1")
[9] Fix | Delete
*/
[10] Fix | Delete
class HmacSha1 extends SignatureMethod {
[11] Fix | Delete
function get_name() {
[12] Fix | Delete
return "HMAC-SHA1";
[13] Fix | Delete
}
[14] Fix | Delete
[15] Fix | Delete
public function build_signature($request, $consumer, $token) {
[16] Fix | Delete
$base_string = $request->get_signature_base_string();
[17] Fix | Delete
$request->base_string = $base_string;
[18] Fix | Delete
[19] Fix | Delete
$key_parts = array(
[20] Fix | Delete
$consumer->secret,
[21] Fix | Delete
($token) ? $token->secret : ""
[22] Fix | Delete
);
[23] Fix | Delete
[24] Fix | Delete
$key_parts = Util::urlencode_rfc3986($key_parts);
[25] Fix | Delete
$key = implode('&', $key_parts);
[26] Fix | Delete
[27] Fix | Delete
return base64_encode(hash_hmac('sha1', $base_string, $key, true));
[28] Fix | Delete
}
[29] Fix | Delete
}
[30] Fix | Delete
[31] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function