protected function keygen($length)
    {
        $key = '';
        for($i = 1; $i < $length; $i++) {
            $key .= mt_rand(0,9);
        }
        $key .= mt_rand(1,9);
        
        return $key;
    }
protected function keygen($length)
    {
        $key = '';
        for($i = 1; $i < $length; $i++) {
            $key .= mt_rand(0,9);
        }
        $key .= mt_rand(1,9);
        
        return $key;
    }
protected function keygen ( $ length ) { $ key = '' ; for ( $ i = 1 ; $ i < $ length ; $ i ++ ) { $ key .= mt_rand ( 0 , 9 ) ; } $ key .= mt_rand ( 1 , 9 ) ; return $ key ; }
Generates a private key.
@param int $length Length of the key.
Generates a private key .