Toggle navigation
Hot Examples
PT
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Pesquisar
Página Inicial
Elgg
Security
UrlSigner
PHP Class Elgg\Security\UrlSigner
Exibir arquivo
Open project: elgg/elgg
Public Methods
Method
Description
isValid
(
string
$url
) :
boolean
Validates HMAC signature
sign
(
string
$url
,
string
$expires
= false ) :
string
Normalizes and signs the URL with SHA256 HMAC key
Method Details
isValid()
public
method
Validates HMAC signature
public
isValid
(
string
$url
) :
boolean
$url
string
URL to vlaidate
return
boolean
sign()
public
method
Normalizes and signs the URL with SHA256 HMAC key
public
sign
(
string
$url
,
string
$expires
= false ) :
string
$url
string
URL to sign
$expires
string
Expiration time Accepts a string suitable for strtotime() Falsey values indicate non-expiring URL
return
string