„threadr/signup/verify-email/index.php“ ändern

master
Jakob 2020-02-23 21:43:09 +01:00
parent 8fe07541b5
commit 483705d42e
1 changed files with 19 additions and 0 deletions

View File

@ -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> <!DOCTYPE html>
<html> <html>
<head> <head>