protected function generateSig($endpoint, array $params, $secret)
    {
        $sig = $endpoint;
        ksort($params);
        foreach ($params as $key => $val) {
            $sig .= "|$key=$val";
        }
        return hash_hmac('sha256', $sig, $secret, false);
    }
protected function generateSig($endpoint, array $params, $secret)
    {
        $sig = $endpoint;
        ksort($params);
        foreach ($params as $key => $val) {
            $sig .= "|$key=$val";
        }
        return hash_hmac('sha256', $sig, $secret, false);
    }
protected function generateSig ( $ endpoint , array $ params , $ secret ) { $ sig = $ endpoint ; ksort ( $ params ) ; foreach ( $ params as $ key => $ val ) { $ sig .= "|$key=$val" ; } return hash_hmac ( 'sha256' , $ sig , $ secret , false ) ; }
Generates a ``sig`` value for a request.

@param  string $endpoint
@param  array  $params
@param  string $secret

@return string
Generates a sig value for a request .