signature ( $datetime )

Calculate the signature.

Access

protected

Parameters

Parameter

Type

Required

Description

$datetime

string

Required

The current timestamp.

Returns

Type

Description

string

The signature.

Source

Method defined in authentication/signature_v4query.class.php | Toggle source view (10 lines) | View on GitHub

protected function signature($datetime)
{
    $k_date        = $this->hmac('AWS4' . $this->secret_key, substr($datetime, 0, 8));
    $k_region      = $this->hmac($k_date, $this->region());
    $k_service     = $this->hmac($k_region, $this->service());
    $k_credentials = $this->hmac($k_service, 'aws4_request');
    $signature     = $this->hmac($k_credentials, $this->string_to_sign($datetime));

    return $signature;
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback