I'm trying to move authentication from the stored procedure to EF. The SQL itself is returning 2 results. How should I validate them?
The value is to be checked against the value stored in the table
ECC2065575DCBF977CD923996C598C3DC481404E
SQL syntax:
Declare @Password AS NVARCHAR(256) = 'Quest_2016'
DECLARE @PasswordSalt AS NVARCHAR(5) = 'LCY''n'
DECLARE @PasswordWithSalt AS NVARCHAR(261) = @Password + @PasswordSalt
print @PasswordWithSalt
result:1 Quest_2016LCY'n
print HASHBYTES(N'SHA1', @PasswordWithSalt )
result 2: 0xECC2065575DCBF977CD923996C598C3DC481404E-----
print HASHBYTES(N'SHA1', 'Quest_2016LCY''n')
result 3: 0x5E85AB2ED11CDB696BC0544131D7C8571F4F8FA8-----
Also just what how this can be implemented in C#