code: public function createSignature(
      	$path = '/',
      	$resource = 'b',
      	$permissions = 'r',
      	$start = '',
      	$expiry = '',
      	$identifier = ''
      ) {
  		// Determine path
  		if ($this->usePathStyleUri) {
  			$path = substr($path, strpos($path, '/'));
  		}
  
  		// Add trailing slash to $path
  		if (substr($path, 0, 1) !== '/') {
  		    $path = '/' . $path;
  		}
  
  		// Build canonicalized resource string
  		$canonicalizedResource  = '/' . $this->accountName;
  		/*if ($this->usePathStyleUri) {
  			$canonicalizedResource .= '/' . $this->accountName;
  		}*/
  		$canonicalizedResource .= $path;
  
  		// Create string to sign
  		$stringToSign   = array();
  		$stringToSign[] = $permissions;
      	$stringToSign[] = $start;
      	$stringToSign[] = $expiry;
      	$stringToSign[] = $canonicalizedResource;
      	$stringToSign[] = $identifier;
  
      	$stringToSign = implode("\n", $stringToSign);
      	$signature    = base64_encode(hash_hmac('sha256', $stringToSign, $this->accountKey, true));
  
      	return $signature;
      }
docs: Create signature
  
  @param string $path 		   Path for the request
  @param string $resource     Signed resource - container (c) - blob (b)
  @param string $permissions  Signed permissions - read (r), write (w), delete (d) and list (l)
  @param string $start        The time at which the Shared Access Signature becomes valid.
  @param string $expiry       The time at which the Shared Access Signature becomes invalid.
  @param string $identifier   Signed identifier
  @return string