I have a binary hash:
var hash = PasswordHash.ArgonHashBinary(Encoding.ASCII.GetBytes(passwd), salt,StrengthArgon.Interactive)
Please tell me how can I convert byte array returned by method ArgonHashBinary()
so that I can verify my password using ArgonHashStringVerify()
.
P.S. there is no method that would allow me to verify password directly from binary hash i.e. there is no ArgonHashBinaryVerify()
method.
Contrived example code:
var salt = PasswordHash.ArgonGenerateSalt();
var passwd = "ABCD";
var hash = PasswordHash.ArgonHashBinary(Encoding.ASCII.GetBytes(passwd), salt,StrengthArgon.Interactive);
if (ArgonHashStringVerify(hash, passwd))
{
// password match
}
else
{
// error
}