You are here

function LingotekOAuthRequest::calculateDataSignature in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.4 lib/oauth-php/library/LingotekOAuthRequest.php \LingotekOAuthRequest::calculateDataSignature()
  2. 7.5 lib/oauth-php/library/LingotekOAuthRequest.php \LingotekOAuthRequest::calculateDataSignature()
  3. 7.6 lib/oauth-php/library/LingotekOAuthRequest.php \LingotekOAuthRequest::calculateDataSignature()

* Calculate the signature of a string. * Uses the signature method from the current parameters. * *

Parameters

string data: * @param string consumer_secret * @param string token_secret * @param string signature_method * @exception OAuthException2 thrown when the signature method is unknown * @return string signature

2 calls to LingotekOAuthRequest::calculateDataSignature()
LingotekOAuthRequest::calculateSignature in lib/oauth-php/library/LingotekOAuthRequest.php
* Calculate the signature of the request, using the method in oauth_signature_method. * The signature is returned encoded in the form as used in the url. So the base64 and * urlencoding has been done. * *
LingotekOAuthRequestSigner::sign in lib/oauth-php/library/LingotekOAuthRequestSigner.php
* Sign our message in the way the server understands. * Set the needed oauth_xxxx parameters. * *

File

lib/oauth-php/library/LingotekOAuthRequest.php, line 188

Class

LingotekOAuthRequest
Object to parse an incoming OAuth request or prepare an outgoing OAuth request

Code

function calculateDataSignature($data, $consumer_secret, $token_secret, $signature_method) {
  if (is_null($data)) {
    $data = '';
  }
  $sig = $this
    ->getSignatureMethod($signature_method);
  return $sig
    ->signature($this, $data, $consumer_secret, $token_secret);
}