local/modules/Klikandpay/Klikandpay.php
/**
     * Method used to generate a random key
     *
     * @param int $length Length of the string
     * @param string $list Allowed characters
     *
     * @return string Returns a string
     */
Method used to generate a random key
@param int $length Length of the string
@param string $list Allowed characters

@return string Returns a string
Method used to generate a random key @param int $length Length of the string @param string $list Allowed characters @return string Returns a string
public function keygen($length = 40, $list = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789')
    {
        $key = '';
        $nb = strlen($list);
        for ($i = 0; $i < $length; $i++, $key .= $list[mt_rand(1, $nb)-1]);
        return $key;
    }
public function keygen ( $ length = 40 , $ list = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' ) { $ key = '' ; $ nb = strlen ( $ list ) ; for ( $ i = 0 ; $ i < $ length ; $ i ++ , $ key .= $ list [ mt_rand ( 1 , $ nb ) - 1 ] ) ; return $ key ; }
Method used to generate a random key
 @param int $length Length of the string
 @param string $list Allowed characters
Method used to generate a random key @param int $length Length of the string @param string $list Allowed characters