protected function sign($operation) {
	
		$params = array(
			'AWSAccessKeyId' => $this->accesskey,
			'Timestamp' => gmdate('Y-m-d\TH:i:s.000\Z'),
		);

		$sign_str = 'AmazonS3' . $operation . $params['Timestamp'];
		
		$params['Signature'] = base64_encode(hash_hmac('sha1', $sign_str, $this->secretkey, TRUE));
		
		return $params;
	}
protected function sign($operation) {
	
		$params = array(
			'AWSAccessKeyId' => $this->accesskey,
			'Timestamp' => gmdate('Y-m-d\TH:i:s.000\Z'),
		);

		$sign_str = 'AmazonS3' . $operation . $params['Timestamp'];
		
		$params['Signature'] = base64_encode(hash_hmac('sha1', $sign_str, $this->secretkey, TRUE));
		
		return $params;
	}
protected function sign ( $ operation ) { $ params = array ( 'AWSAccessKeyId' => $ this -> accesskey , 'Timestamp' => gmdate ( 'Y-m-d\TH:i:s.000\Z' ) , ) ; $ sign_str = 'AmazonS3' . $ operation . $ params [ 'Timestamp' ] ; $ params [ 'Signature' ] = base64_encode ( hash_hmac ( 'sha1' , $ sign_str , $ this -> secretkey , TRUE ) ) ; return $ params ; }
Generating signature and timestamp for specified S3 operation

@param  string  $operation    S3 operation name
@return array
@author Alexey Sukhotin
Generating signature and timestamp for specified S3 operation