Class CookiesCrypter Designed to encrypt and decrypt cookies.
См. определение в файле cookiescrypter.php строка 15
◆ __construct()
◆ buildCipher()
Builds cipher object.
- Возвращает
- $this
- Исключения
-
См. определение в файле cookiescrypter.php строка 35
◆ decrypt()
decrypt |
( |
string | $name, |
|
|
string | $value, |
|
|
iterable | $cookies ) |
Decrypts cookie if needed.
- Аргументы
-
string | $name | Cookie name. |
string | $value | Encrypted cookie value. |
iterable | $cookies | Cookies to decrypt. |
- Возвращает
- string
См. определение в файле cookiescrypter.php строка 91
◆ decryptValue()
decryptValue |
( |
string | $value | ) |
|
|
protected |
Decrypts value.
- Аргументы
-
string | $value | Value to decrypt. |
- Возвращает
- string
- Исключения
-
SecurityException | |
SystemException | |
См. определение в файле cookiescrypter.php строка 200
◆ encrypt()
Packs and encrypts cookie.
- Аргументы
-
CryptoCookie | $cookie | Cookie to encrypt. |
- Возвращает
- iterable|Cookie[]
- Исключения
-
SecurityException | |
SystemException | |
См. определение в файле cookiescrypter.php строка 72
◆ encryptValue()
encryptValue |
( |
string | $value | ) |
|
|
protected |
Encrypts value. Also compresses value if possible.
- Аргументы
-
string | $value | Value to encrypt. |
- Возвращает
- string
- Исключения
-
SecurityException | |
SystemException | |
См. определение в файле cookiescrypter.php строка 182
◆ getCipherKey()
◆ packCookie()
Packs cookie into several parts to fit into cookie size limit.
- Аргументы
-
CryptoCookie | $cookie | Cookie to pack. |
string | $encryptedValue | Encrypted cookie value. |
- Возвращает
- iterable|Cookie[]
См. определение в файле cookiescrypter.php строка 116
◆ prependSign()
prependSign |
( |
string | $value | ) |
|
|
protected |
Prepends sign to value.
- Аргументы
-
string | $value | Value to prepend sign to. |
- Возвращает
- string
См. определение в файле cookiescrypter.php строка 267
◆ prependSuffixToKey()
prependSuffixToKey |
( |
string | $key | ) |
|
|
protected |
Prepends suffix to key.
- Аргументы
-
string | $key | Key to prepend suffix to. |
- Возвращает
- string
См. определение в файле cookiescrypter.php строка 60
◆ removeSign()
removeSign |
( |
string | $value | ) |
|
|
protected |
Removes sign prefix from value.
- Аргументы
-
string | $value | Value to remove sign from. |
- Возвращает
- string
См. определение в файле cookiescrypter.php строка 277
◆ shouldDecrypt()
shouldDecrypt |
( |
string | $cookieName, |
|
|
string | $cookieValue ) |
Checks if cookie should be decrypted.
- Аргументы
-
string | $cookieName | Cookie name. |
string | $cookieValue | Cookie value. |
- Возвращает
- bool
См. определение в файле cookiescrypter.php строка 252
◆ shouldEncrypt()
shouldEncrypt |
( |
Cookie | $cookie | ) |
|
Checks if cookie should be encrypted.
- Аргументы
-
Cookie | $cookie | Cookie to check. |
- Возвращает
- bool
См. определение в файле cookiescrypter.php строка 241
◆ unpackCookie()
unpackCookie |
( |
string | $mainCookie, |
|
|
iterable | $cookies ) |
|
protected |
Unpacks cookie from several parts.
- Аргументы
-
string | $mainCookie | Main cookie value. |
iterable | $cookies | Cookies to decrypt. |
- Возвращает
- string
См. определение в файле cookiescrypter.php строка 149
◆ $cipher
◆ $cipherKey
◆ COOKIE_MAX_SIZE
const COOKIE_MAX_SIZE = 4096 |
◆ COOKIE_RESERVED_SUFFIX_BYTES
const COOKIE_RESERVED_SUFFIX_BYTES = 3 |
Объявления и описания членов класса находятся в файле: