1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс CookiesCrypter

Открытые члены

 __construct ()
 encrypt (CryptoCookie $cookie)
 decrypt (string $name, string $value, iterable $cookies)
 shouldEncrypt (Cookie $cookie)
 shouldDecrypt (string $cookieName, string $cookieValue)
 getCipherKey ()

Поля данных

const COOKIE_MAX_SIZE = 4096
const COOKIE_RESERVED_SUFFIX_BYTES = 3

Защищенные члены

 buildCipher ()
 prependSuffixToKey (string $key)
 packCookie (CryptoCookie $cookie, string $encryptedValue)
 unpackCookie (string $mainCookie, iterable $cookies)
 encryptValue (string $value)
 decryptValue (string $value)
 prependSign (string $value)
 removeSign (string $value)

Защищенные данные

string $cipherKey
Cipher $cipher

Подробное описание

Class CookiesCrypter Designed to encrypt and decrypt cookies.

См. определение в файле cookiescrypter.php строка 15

Конструктор(ы)

◆ __construct()

__construct ( )

См. определение в файле cookiescrypter.php строка 26

Методы

◆ buildCipher()

buildCipher ( )
protected

Builds cipher object.

Возвращает
$this
Исключения
SystemException

См. определение в файле cookiescrypter.php строка 35

◆ decrypt()

decrypt ( string $name,
string $value,
iterable $cookies )

Decrypts cookie if needed.

Аргументы
string$nameCookie name.
string$valueEncrypted cookie value.
iterable$cookiesCookies to decrypt.
Возвращает
string

См. определение в файле cookiescrypter.php строка 91

◆ decryptValue()

decryptValue ( string $value)
protected

Decrypts value.

Аргументы
string$valueValue to decrypt.
Возвращает
string
Исключения
SecurityException
SystemException

См. определение в файле cookiescrypter.php строка 200

◆ encrypt()

encrypt ( CryptoCookie $cookie)

Packs and encrypts cookie.

Аргументы
CryptoCookie$cookieCookie to encrypt.
Возвращает
iterable|Cookie[]
Исключения
SecurityException
SystemException

См. определение в файле cookiescrypter.php строка 72

◆ encryptValue()

encryptValue ( string $value)
protected

Encrypts value. Also compresses value if possible.

Аргументы
string$valueValue to encrypt.
Возвращает
string
Исключения
SecurityException
SystemException

См. определение в файле cookiescrypter.php строка 182

◆ getCipherKey()

getCipherKey ( )

Returns cipher key.

Возвращает
string

См. определение в файле cookiescrypter.php строка 286

◆ packCookie()

packCookie ( CryptoCookie $cookie,
string $encryptedValue )
protected

Packs cookie into several parts to fit into cookie size limit.

Аргументы
CryptoCookie$cookieCookie to pack.
string$encryptedValueEncrypted cookie value.
Возвращает
iterable|Cookie[]

См. определение в файле cookiescrypter.php строка 116

◆ prependSign()

prependSign ( string $value)
protected

Prepends sign to value.

Аргументы
string$valueValue to prepend sign to.
Возвращает
string

См. определение в файле cookiescrypter.php строка 267

◆ prependSuffixToKey()

prependSuffixToKey ( string $key)
protected

Prepends suffix to key.

Аргументы
string$keyKey to prepend suffix to.
Возвращает
string

См. определение в файле cookiescrypter.php строка 60

◆ removeSign()

removeSign ( string $value)
protected

Removes sign prefix from value.

Аргументы
string$valueValue to remove sign from.
Возвращает
string

См. определение в файле cookiescrypter.php строка 277

◆ shouldDecrypt()

shouldDecrypt ( string $cookieName,
string $cookieValue )

Checks if cookie should be decrypted.

Аргументы
string$cookieNameCookie name.
string$cookieValueCookie value.
Возвращает
bool

См. определение в файле cookiescrypter.php строка 252

◆ shouldEncrypt()

shouldEncrypt ( Cookie $cookie)

Checks if cookie should be encrypted.

Аргументы
Cookie$cookieCookie to check.
Возвращает
bool

См. определение в файле cookiescrypter.php строка 241

◆ unpackCookie()

unpackCookie ( string $mainCookie,
iterable $cookies )
protected

Unpacks cookie from several parts.

Аргументы
string$mainCookieMain cookie value.
iterable$cookiesCookies to decrypt.
Возвращает
string

См. определение в файле cookiescrypter.php строка 149

Поля

◆ $cipher

Cipher $cipher
protected

См. определение в файле cookiescrypter.php строка 24

◆ $cipherKey

string $cipherKey
protected

См. определение в файле cookiescrypter.php строка 23

◆ COOKIE_MAX_SIZE

const COOKIE_MAX_SIZE = 4096

См. определение в файле cookiescrypter.php строка 17

◆ COOKIE_RESERVED_SUFFIX_BYTES

const COOKIE_RESERVED_SUFFIX_BYTES = 3

См. определение в файле cookiescrypter.php строка 18


Объявления и описания членов класса находятся в файле: