[Plugin] SHA512
#46

Quote:
Originally Posted by Jajetin
Посмотреть сообщение
Password with PHP: ($passcrypt = hash_hmac('sha512', $_POST['password'], DB_PASS_SALT)

6c5a950af83bb9d0110692c538f9b9455bbde016092aff3d0f 3c885881974044677c42dbb9f7c57b24a518a3dabb7f63e5f6 9061e7b9cdf50d676c0d2315ad4b


And Password with samp:
ddc89a13455bc51cd221b292d50de2bfe5509b9f1a27acc2f9 a3f1104a1b1cf9f40653a9e973f54e989af1197fb784d36f86 f17210a88616259c2dfeb5a251db


its different

as I can make the encryption is the same?
You are hashing with a salt in PHP.
Use
PHP код:
$passcrypt hash('sha512'$_POST['password']); 
to get the same results.

Although, you probably want to salt it (for better security) so do something like this:
PHP код:
$passcrypt hash('sha512'$POST['password'] . 'mySalt'); 
If you do that then make sure you've done the same in PAWN:
pawn Код:
new passcrypt[128], saltedPassword[128];
format(saltedPassword, sizeof(saltedPassword), "%smySalt", password);
SHA512(saltedPassword, passcrypt, 128);
* Make sure the salt is same in PHP and PAWN.
* Concatenating the salt to the end of the password is pretty common practise so you want to come up with your own combination (like adding it to the front twice and 3 times at the back). Just make sure that if the same input is given, the same output will be produced every single time.
Reply


Messages In This Thread
SHA512 - by RyDeR` - 08.11.2010, 20:41
Re: SHA1 - by Moglizorz. - 08.11.2010, 20:45
Re: SHA1 - by RyDeR` - 08.11.2010, 20:49
Re: SHA1 - by Burridge - 08.11.2010, 20:50
Re: SHA1 - by RyDeR` - 08.11.2010, 20:52
Re: SHA1 - by WillyP - 08.11.2010, 21:17
Respuesta: SHA1 - by anonymousx - 08.11.2010, 21:20
Re: SHA1 - by bigcomfycouch - 08.11.2010, 21:30
Re: SHA1 - by Burridge - 08.11.2010, 21:31
Re: SHA1 - by MrDeath537 - 09.11.2010, 03:44
Re: SHA1 - by Retardedwolf - 09.11.2010, 05:06
Re: SHA1 - by RyDeR` - 09.11.2010, 10:13
AW: SHA1 - by Extremo - 09.11.2010, 10:28
Re: SHA1 - by Zh3r0 - 09.11.2010, 12:02
Re: SHA1 - by [H]265 - 09.11.2010, 14:20
Re: SHA1 - by Brian_Furious - 09.11.2010, 14:26
Respuesta: SHA1 - by MrDeath537 - 09.11.2010, 14:28
Re: SHA1 - by RyDeR` - 09.11.2010, 15:04
Re: SHA1 - by HyperZ - 09.11.2010, 15:25
Re: SHA1 - by Brian_Furious - 09.11.2010, 16:07
Re: SHA1 - by RyDeR` - 09.11.2010, 16:17
Respuesta: SHA1 - by xenowort - 09.11.2010, 16:36
Re: SHA1 - by Brian_Furious - 09.11.2010, 16:38
Respuesta: Re: SHA1 - by xenowort - 09.11.2010, 16:41
Re: Respuesta: SHA1 - by DiDok - 09.11.2010, 17:32
Re: Respuesta: SHA1 - by ziomal432 - 09.11.2010, 19:04
Respuesta: Re: Respuesta: SHA1 - by xenowort - 09.11.2010, 19:16
Respuesta: Re: SHA1 - by MrDeath537 - 09.11.2010, 19:23
Re: SHA1 - by nemesis- - 09.11.2010, 22:01
Re: SHA512 - by HyperZ - 13.01.2011, 10:14
Re: SHA512 - by Rock_Ro - 14.07.2011, 07:55
Re: SHA512 - by Lorenc_ - 14.07.2011, 09:06
Re: SHA512 - by FANEX - 14.07.2011, 10:26
Re: SHA512 - by Lorenc_ - 14.07.2011, 15:59
Re: SHA512 - by FireCat - 14.07.2011, 16:11
Re: SHA512 - by Rock_Ro - 14.07.2011, 23:03
Re: SHA512 - by Dodus - 09.09.2011, 15:36
Re: SHA512 - by Kaperstone - 09.09.2011, 15:54
AW: Re: SHA512 - by thiaZ_ - 09.09.2011, 16:01
Re: SHA512 - by cssbart - 22.08.2012, 15:06
Re: SHA512 - by Edvin - 22.08.2012, 16:23
Re: SHA512 - by Glint - 22.08.2012, 16:50
Re: SHA512 - by Memoryz - 22.08.2012, 16:54
Re: SHA512 - by Jajetin - 16.10.2013, 12:26
Re: SHA512 - by Sublime - 16.10.2013, 13:12
Re: SHA512 - by DaRealShazz - 23.10.2013, 00:45
Re: SHA512 - by Tatar1n - 29.12.2013, 10:12
AW: SHA512 - by Mellnik - 29.12.2013, 10:34
Re: SHA512 - by Tatar1n - 29.12.2013, 10:39
Re: SHA512 - by seegras - 18.02.2015, 02:09

Forum Jump:


Users browsing this thread: 1 Guest(s)