Fix calcul of hardware key