src/Northern/Common/Util/TokenUtil.php
public static function getNonce($length = 32)
    {
        do {
            $entropy = openssl_random_pseudo_bytes($length, $strong);
        } while ($strong === false);

        $nonce = sha1($entropy);

        return $nonce;
    }
public static function getNonce($length = 32)
    {
        do {
            $entropy = openssl_random_pseudo_bytes($length, $strong);
        } while ($strong === false);

        $nonce = sha1($entropy);

        return $nonce;
    }
public static function getNonce ( $ length = 32 ) { do { $ entropy = openssl_random_pseudo_bytes ( $ length , $ strong ) ; } while ( $ strong === false ) ; $ nonce = sha1 ( $ entropy ) ; return $ nonce ; }
This method will generate a pseudo random SHA1 that can be used as nonce or
other kind of token. To specifiy the length of the token use the length
parameter.

@param int $length
This method will generate a pseudo random SHA1 that can be used as nonce or other kind of token . To specifiy the length of the token use the length parameter .