[Off] Encriptaciуn sha1 y md5 en MySQL
#6

Yo tengo exactamente lo que tu quieres y la parte del gamemode lo tengo asн:

Crear cuenta:

pawn Код:
SQL_CrearCuenta(const username[], const password[])
{
    static query[512];
    format(query, sizeof(query), "INSERT INTO `cuentas` (`Username`, `Password`, `RegisterDate`, `LoginDate`) VALUES('%s', SHA1('%s'), '%s', '%s')", username, password, ReturnDate(), ReturnDate());
    mysql_function_query(g_iHandle, query, false, "", "");
}
Y con esto compruebo las claves:

pawn Код:
SQL_ComprobarClave(playerid, const password[])
{
    static query[300];
    format(query, sizeof(query), "SELECT `ID` FROM `cuentas` WHERE `Username` = '%s' AND `Password` = SHA1('%s')", PlayerInfo[playerid][pNombreJugador], password);
    mysql_function_query(g_iHandle, query, true, "OnQueryFinished", "dd", playerid, ComprobarIntentoLogin);

}
Reply


Messages In This Thread
Encriptaciуn sha1 y md5 en MySQL - by Wayzzar - 26.08.2017, 19:47
Respuesta: Encriptaciуn sha1 y md5 en MySQL - by Dance94 - 26.08.2017, 22:42
Re: Encriptaciуn sha1 y md5 en MySQL - by Wayzzar - 27.08.2017, 20:02
Respuesta: Encriptaciуn sha1 y md5 en MySQL - by Dance94 - 28.08.2017, 00:03
Respuesta: Encriptaciуn sha1 y md5 en MySQL - by EobardRodriguez - 28.08.2017, 03:54
Respuesta: Encriptaciуn sha1 y md5 en MySQL - by Tirael - 28.08.2017, 22:23
Re: Encriptaciуn sha1 y md5 en MySQL - by Wayzzar - 29.08.2017, 17:48

Forum Jump:


Users browsing this thread: 2 Guest(s)