Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
signaturemanager.php
1
<?php
2
namespace
Bitrix\Main\UserField
;
3
4
5
use
Bitrix\Main\Security\Sign\Signer
;
6
7
class
SignatureManager
8
{
12
protected
$signer
;
13
14
public
function
__construct
()
15
{
16
}
17
18
public
function
getSignature
($data)
19
{
20
return
$this->
getSigner
()->getSignature($data, $this->
getSignatureSalt
());
21
}
22
23
public
function
validateSignature
($data, $signature)
24
{
25
return
$this->
getSigner
()->validate(
26
$data,
27
$signature,
28
$this->
getSignatureSalt
()
29
);
30
}
31
35
public
function
getSigner
()
36
{
37
if
(!$this->signer)
38
{
39
$this->
setDefaultSigner
();
40
}
41
42
return
$this->signer
;
43
}
44
48
public
function
setSigner
(
Signer
$signer
)
49
{
50
$this->signer =
$signer
;
51
}
52
53
protected
function
setDefaultSigner
()
54
{
55
$this->
setSigner
(
new
Signer
());
56
}
57
58
protected
function
getSignatureSalt
()
59
{
60
return
bitrix_sessid();
61
}
62
}
Bitrix\Main\Security\Sign\Signer
Definition
signer.php:13
Bitrix\Main\UserField\SignatureManager
Definition
signaturemanager.php:8
Bitrix\Main\UserField\SignatureManager\__construct
__construct()
Definition
signaturemanager.php:14
Bitrix\Main\UserField\SignatureManager\getSignatureSalt
getSignatureSalt()
Definition
signaturemanager.php:58
Bitrix\Main\UserField\SignatureManager\validateSignature
validateSignature($data, $signature)
Definition
signaturemanager.php:23
Bitrix\Main\UserField\SignatureManager\getSigner
getSigner()
Definition
signaturemanager.php:35
Bitrix\Main\UserField\SignatureManager\getSignature
getSignature($data)
Definition
signaturemanager.php:18
Bitrix\Main\UserField\SignatureManager\setSigner
setSigner(Signer $signer)
Definition
signaturemanager.php:48
Bitrix\Main\UserField\SignatureManager\$signer
$signer
Definition
signaturemanager.php:12
Bitrix\Main\UserField\SignatureManager\setDefaultSigner
setDefaultSigner()
Definition
signaturemanager.php:53
Bitrix\Main\UserField
modules
main
lib
userfield
signaturemanager.php
Создано системой
1.10.0