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

podświetlone jako c_mac (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;
}
 
| Bio Słodycze | | Perfumy Dla Dzieci | | Opony letnie | | Darmowe Blogi | | Best Microwaves UK 2025 | | Best Fully Automatic Coffee Machines UK 2025 | | Bamboo Socks UK | | Wigs shop UK | | Ski Gloves UK Shop | | Car Tyres UK |