hmac ( $key, $string )

Applies HMAC SHA-256 encryption to the string, salted by the key.

Access

protected

Parameters

Parameter

Type

Required

Description

$key

Required

$string

Required

Returns

Type

Description

string

Raw HMAC SHA-256 hashed string.

Source

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

protected function hmac($key, $string)
{
    return hash_hmac('sha256', $string, $key, true);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback