79712609

Date: 2025-07-23 22:16:48
Score: 1.5
Natty:
Report link

In your sql query the input string type is NVARCHAR. This when encoding uses UTF-16.
In C# you used UTF8 encoding.
The byte representation differs in these 2 cases and hence you see diff SHA-256 hashes.

Both are valid. It depends on the encoding you prefer.
If you prefer to use UTF-8 in sql then use VARCHAR for input type.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: SidHunt