public function signature($method, $path, array $params = array())
    {
        $params = $this->completeParams($params);

        ksort($params);

        if (isset($params['file'])) {
            unset($params['file']);
        }

        $canonicalQueryString = str_replace(
            array('+', '%5B', '%5D'),
            array('%20', '[', ']'),
            http_build_query($params, '', '&')
        );
        $stringToSign = sprintf(
            "%s\n%s\n%s\n%s",
            strtoupper($method),
            $this->account->getApiHost(),
            $path,
            $canonicalQueryString
        );
        $hmac = hash_hmac('sha256', $stringToSign, $this->account->getSecretKey(), true);

        return base64_encode($hmac);
    }