initial commit
This commit is contained in:
commit
7755aa53f7
7 changed files with 69 additions and 0 deletions
11
app/pswd.php
Normal file
11
app/pswd.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
$title = "Password generator";
|
||||
$root = $_SERVER["DOCUMENT_ROOT"];
|
||||
require "$root/templates/header.php";
|
||||
|
||||
$str = strtr(base64_encode(random_bytes(15)), '+/', '-_');
|
||||
$str[random_int(0, 19)] = random_int(0, 1) ? '-' : '_';
|
||||
echo "<div>$str</div>\n";
|
||||
|
||||
require "$root/templates/footer.php";
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue