W
W
wasd3602018-06-20 22:45:07
PHP
wasd360, 2018-06-20 22:45:07

How to get password hash in this kind of db?

Greetings.
You need to store the password in (mysql) like this:

sha1:1000:oNsMooGkvbmtYx7g118FdIRyuMElA4vL:1izkAXExj6he6ARrH3K+srXxemvL15/0

Searched on google, found nothing.
If it's not difficult, poke your nose straight.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Aksentiev, 2018-06-21
@Sanasol

Apparently, PBKDF1 / PBKDF2 was lost at the beginning
and this is obtained by PBKDF with the sha1 algorithm and 1000 iterations.
The rest of the string is the base64 of the resulting salt and password bytes.
php.net/manual/en/function.hash-pbkdf2.php
For the output you need to use raw_output - to get the bytes
AND translate this into base64, then you get something like the hash as in the example.
Probably something like that.
How the hell knows how to get the salt and password bytes separately, look for yourself.
Or maybe just sha1 with 1000 iterations, and translated into bytes and base64. Although that would be weird.

S
Stalker_RED, 2018-06-21
@Stalker_RED

php.net/manual/en/faq.passwords.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question