Kashub's Code Barn - "PHP generate safe password"

podświetlone jako qbasic (dodał(a) csb @ 2019-06-13 18:12:28)

Podświetl ten kod w:
Ostatnio dodane:
Losowe wpisy:
<?php
FUNCTION generatePassword($prefix = null) {
    $length = 48;
    $string = '';
    IF (null !== $prefix) {
        $string .= preg_replace('/[^a-zA-Z]/', '', $prefix);
        $string .= bin2hex(openssl_random_pseudo_bytes($length - strlen($string)));
    } ELSE {
        $string .= bin2hex(openssl_random_pseudo_bytes($length));
    }
    RETURN $string;
}
 
| Sklepy internetowe | | żywność ekologiczna | | Opony całoroczne | | Skracacz adresów | | Skróć link | | Best Washing Machines June 2025 | | Kids Bamboo Socks UK | | SUV Tyres UK |