How to insert a hashed password into table users?
I solved it by using user_authenticate($name, $password) (see https://api.drupal.org/api/drupal/modules!user!user.module/function/user_authenticate/7)

Now my code is :

function my_module_connexion_login($username, $password){

$authentification = user_authenticate($username, $password); &lt;======

$log = db_select('users','u');
$log-&gt;addfield('u','uid','id_user');
$log-&gt;addfield('u','name','username');
$log-&gt;condition('name',$username,'=');
$login = $log-&gt;execute();
$connexion = array();

foreach ($login as $co) {   
    $connexion [] = array(
        'uid'=&gt;$co-&gt;id_user,
        'username'=&gt;$co-&gt;username
        );      
}
if($authentification == false){ &lt;==================
    $response = array();
    return func_succes(3,$response);
}
else{

    $response = $connexion;
    return func_succes(0,$response);
}
}


Thanks