Currently my code looks like this:
if (iInit == 1)
{
if (crypt_set_format("sha512") == 0)
return -1;
iInit = !iInit;
}
res = crypt(szPWhash, "ABCDEFGH");
The resulting hash is € v
I tryed already
res = crypt(szPWhash, "$6$QX$");
or even this notation:
res = crypt(szPWhash, "$6$QX");
But doesn't matter which salt I choose Or whats the entered password is.
The resulting hash is every time unchanged € v
.
What doesn't even look like a sha512 hash.
So what I'm doing wrong?
EDIT
I figured out, that if I change the encrypton mehtod, the hash changes but, it keeps similiar doesn't matter what i choose as key and/or salt.
I don't know about crypt, but with openssl it would look like: