protected function getShaSign(array $params, $out = false)
    {
        uksort($params, 'strcasecmp');

        $shaKey = $this->getOption('sha'.($out ? '-out' : '').'_key');

        $shasignStr = '';
        foreach ($params as $key => $param) {
            if (null !== $param && '' !== $param) {
                $shasignStr .= strtoupper($key).'='.$param.$shaKey;
            }
        }

        return strtoupper(sha1($shasignStr));
    }