private function _signHeader($endpoint, $authMethod, $params)
    {
        if (!is_array($params)) {
            $params = array();
        }
        if ($authMethod) {
            list($key, $value) = explode('=', substr($authMethod, 1), 2);
            $params[$key] = $value;
        }
        $baseString = '/' . $endpoint;
        ksort($params);
        foreach ($params as $key => $value) {
            $baseString .= '|' . $key . '=' . $value;
        }
        $signature = hash_hmac('sha256', $baseString, $this->_apisecret, false);

        return $signature;
    }
private function _signHeader($endpoint, $authMethod, $params)
    {
        if (!is_array($params)) {
            $params = array();
        }
        if ($authMethod) {
            list($key, $value) = explode('=', substr($authMethod, 1), 2);
            $params[$key] = $value;
        }
        $baseString = '/' . $endpoint;
        ksort($params);
        foreach ($params as $key => $value) {
            $baseString .= '|' . $key . '=' . $value;
        }
        $signature = hash_hmac('sha256', $baseString, $this->_apisecret, false);

        return $signature;
    }
private function _signHeader ( $ endpoint , $ authMethod , $ params ) { if ( ! is_array ( $ params ) ) { $ params = array ( ) ; } if ( $ authMethod ) { list ( $ key , $ value ) = explode ( '=' , substr ( $ authMethod , 1 ) , 2 ) ; $ params [ $ key ] = $ value ; } $ baseString = '/' . $ endpoint ; ksort ( $ params ) ; foreach ( $ params as $ key => $ value ) { $ baseString .= '|' . $ key . '=' . $ value ; } $ signature = hash_hmac ( 'sha256' , $ baseString , $ this -> _apisecret , false ) ; return $ signature ; }
Sign header by using endpoint, parameters and the API secret.

@param string
@param string
@param array

@return string The signature
Sign header by using endpoint parameters and the API secret .