230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
|
}
static public function CSRF_field_name($key)
{
return 'gecko/'.base64_encode(sha1($key, true));
}
static public function generatePassword($length, $chars='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890')
{
$string = '';
for ($i = 0; $i < $length; $i++)
{
$pos = rand(0, strlen($chars)-1);
$string .= $chars[$pos];
}
return $string;
}
static public function post($key)
{
return isset($_POST[$key]) ? $_POST[$key] : '';
}
static public function get($key)
{
|
<
<
<
<
<
<
<
<
<
<
<
|
230
231
232
233
234
235
236
237
238
239
240
241
242
243
|
}
static public function CSRF_field_name($key)
{
return 'gecko/'.base64_encode(sha1($key, true));
}
static public function post($key)
{
return isset($_POST[$key]) ? $_POST[$key] : '';
}
static public function get($key)
{
|