I’m trying to do a check for a file uploaded to a varbinary column in SQL Server 2005.
I uploaded the file and using
SELECT DATALENGTH(thefile) FROM table
I get the same number of bytes that the file has.
CHECKSUM is not the better way and HASHBYTES only takes the first 8000 bytes, and my files are so more great than that.
I can only use T-SQL.
Any tip will be helpful.
Thanks a lot 🙂
You can use hash over hash, it has the same strength as single-pass hash:
Of course you can modify the function for returning already final-pass hash