private function generateAuthHeader($verb, $xMsDate, $resourceType, $resourceId)
    {
        $master = 'master';
        $token = '1.0';
        $key = base64_decode($this->key);
        $stringToSign = strtolower($verb) . "\n" .
            strtolower($resourceType) . "\n" .
            $resourceId . "\n" .
            strtolower($xMsDate) . "\n" .
            "\n";

        $sig = base64_encode(hash_hmac('sha256', $stringToSign, $key, true));

        return urlencode("type=$master&ver=$token&sig=$sig");
    }