You are viewing an older version of the site. Click here to view
the latest version of this page. (This may be a dead link, if so, try the root page of the docs
here.)
== hmac_sha1 ==
[[../../Optimizer#CACHE_RETURN|CACHE_RETURN]] |} === Usages ===
Copy Code
The output would be:
Returns the sha1 HMAC of the specified value using the provided key. If the key or value is not a byte array, it will be converted to a byte array through its UTF-8 string representation. This function is aware of and compatible with secure_string.
=== Vital Info ===
{| style="width: 40%;" cellspacing="1" cellpadding="1" border="1" class="wikitable"
|-
! scope="col" width="20%" |
! scope="col" width="80%" |
|-
! scope="row" | Name
| hmac_sha1
|-
! scope="row" | Returns
| string
|-
! scope="row" | Usages
| key, val
|-
! scope="row" | Throws
| [[../objects/ms.lang.PluginInternalException|ms.lang.PluginInternalException]]
|-
! scope="row" | Since
| 3.3.1
|-
! scope="row" | Restricted
| No
|-
! scope="row" | Optimizations
| [[../../Optimizer#CONSTANT_OFFLINE|CONSTANT_OFFLINE]] [[../../Optimizer#CACHE_RETURN|CACHE_RETURN]] |} === Usages ===
hmac_sha1(key, val)=== Examples === ====Example 1==== Basic usage Given the following code:
hmac_sha1('secret_key', 'string')

1 {{function|hmac_sha1}}('secret_key', 'string')
:1963f5c0b9aafbc862b69fb148ed160259082a4a
Find a bug in this page? Edit this page yourself, then submit a pull request. (Note this page is automatically generated from the documentation in the source code.)