@@ 250-262 (lines=13) @@ | ||
247 | return $result; |
|
248 | } |
|
249 | ||
250 | function ldDecodeCookie($cookie) { |
|
251 | global $AR; |
|
252 | $data = json_decode($cookie,true); |
|
253 | if(is_null($data)){ |
|
254 | if(isset($AR->sessionCryptoKey) && function_exists('mcrypt_encrypt') ) { |
|
255 | $key = base64_decode($AR->sessionCryptoKey); |
|
256 | $crypto = new ar_crypt($key,MCRYPT_RIJNDAEL_256,1); |
|
257 | $data = json_decode($crypto->decrypt($cookie),true); |
|
258 | } |
|
259 | } |
|
260 | ||
261 | return $data; |
|
262 | } |
|
263 | ||
264 | function ldEncodeCookie($cookie) { |
|
265 | global $AR; |
@@ 122-134 (lines=13) @@ | ||
119 | return $result; |
|
120 | } |
|
121 | ||
122 | function ldDecodeCookie($cookie) { |
|
123 | global $AR; |
|
124 | $data = json_decode($cookie,true); |
|
125 | if(is_null($data)){ |
|
126 | if(isset($AR->sessionCryptoKey)) { |
|
127 | $key = base64_decode($AR->sessionCryptoKey); |
|
128 | $crypto = new ar_crypt($key,MCRYPT_RIJNDAEL_256,1); |
|
129 | $data = json_decode($crypto->decrypt($cookie),true); |
|
130 | } |
|
131 | } |
|
132 | ||
133 | return $data; |
|
134 | } |
|
135 | ||
136 | function ldEncodeCookie($cookie) { |
|
137 | global $AR; |