__getHash() private static method

This uses the hash extension if loaded
private static __getHash ( string $string ) : string
$string string String to sign
return string
コード例 #1
0
ファイル: S3.php プロジェクト: irovast/eyedock
 public function getAuthenticatedURL(S3 $s3, $bucket, $uri, $lifetime, $hostBucket = false, $https = false)
 {
     $expires = $lifetime + time();
     return sprintf(($https ? 'https' : 'http') . '://%s/%s?AWSAccessKeyId=%s&Expires=%u&Signature=%s', $hostBucket ? $bucket : $bucket . '.s3.amazonaws.com', $uri, $s3->getAccessKey(), $expires, urlencode($s3->__getHash("GET\n\n\n{$expires}\n/{$bucket}/{$uri}")));
 }