Sha512 encryption not working in a converted NodeJS project - error 401

I am converting a project from .NET to NodeJS. I had setup sha512 password encryption in the .NET project with a salt value.

However, this is not working correctly in the converted NodeJS project. I have checked all settings for the Security Provider (Use Password Hash Verify - Unchecked), Password encryption and salt value in the NodeJS project, but the Security Login step keeps returning Unauthorised 401 error.

I have compared the generated sha512 hash values in an online generator form and the encrypted hash values match with the the DB values.

Any help in debugging and resolving this issue would be greatly appreciated.

Do you use the hash formatter for this? It should generate the same hash in NodeJS and .NET. The only thing I can think of is that it maybe in a different case, so that one is uppercase while the other is lowercase.

Check the formatter result with a simple setValue action step and compare it with the value in the database. If the case is wrong then simple add the toLowerCase() or toUpperCase() formatter to correct it.

I used the hash formatter for this conversion. It was an issue with the case. Once I added a text formatter to convert the decrypted sha512 value to uppercase, it started working correctly.

I have now added uppercase() text formatter to all Password related fields to ensure that the value is always saved and retrieved in uppercase.

Thank you for a quick response to assist in resolving this issue, Patrick :slightly_smiling_face: