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");
    }
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");
    }
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" ) ; }
Generates the request Authorization header.

@link   http://msdn.microsoft.com/en-us/library/azure/dn783368.aspx

@param string $verb         Request Method (HEAD, GET, POST, PUT, DELETE)
@param string $xMsDate      Request date/time string
@param string $resourceType Requested resource Type
@param string $resourceId   Requested resource ID

@return string Authorization string
Generates the request Authorization header .