„threadr/signup/verify-email/index.php“ ändern
parent
8fe07541b5
commit
483705d42e
|
@ -1,3 +1,22 @@
|
|||
<?php
|
||||
//permitted chars for password salt
|
||||
$permitted_chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ&/()[]$:?_';
|
||||
|
||||
//generates password salt
|
||||
function generate_salt($input, $strength = 5) {
|
||||
$input_length = strlen($input);
|
||||
$random_string = '';
|
||||
for($i = 0; $i < $strength; $i++) {
|
||||
$random_character = $input[random_int(0, $input_length - 1)];
|
||||
$random_string .= $random_character;
|
||||
}
|
||||
return $random_string;
|
||||
}
|
||||
|
||||
$random_salt = generate_salt($permitted_chars);
|
||||
$password_hash_method = "sha256";
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
|
Loading…
Reference in New Issue