public function sign($http_method, $url, $params, $secret) {
        $sig = array(
            strtoupper($http_method),
            preg_replace('/%7E/', '~', rawurlencode($url)),
            rawurlencode($this->get_signable_parameters($params)),
        );

        $base_string = implode('&', $sig);
        $sig = base64_encode(hash_hmac('sha1', $base_string, $secret, true));
        return $sig;
    }
public function sign($http_method, $url, $params, $secret) {
        $sig = array(
            strtoupper($http_method),
            preg_replace('/%7E/', '~', rawurlencode($url)),
            rawurlencode($this->get_signable_parameters($params)),
        );

        $base_string = implode('&', $sig);
        $sig = base64_encode(hash_hmac('sha1', $base_string, $secret, true));
        return $sig;
    }
public function sign ( $ http_method , $ url , $ params , $ secret ) { $ sig = array ( strtoupper ( $ http_method ) , preg_replace ( '/%7E/' , '~' , rawurlencode ( $ url ) ) , rawurlencode ( $ this -> get_signable_parameters ( $ params ) ) , ) ; $ base_string = implode ( '&' , $ sig ) ; $ sig = base64_encode ( hash_hmac ( 'sha1' , $ base_string , $ secret , true ) ) ; return $ sig ; }
Create signature for oauth request
@param string $url
@param string $secret
@param array $params
@return string
Create signature for oauth request