If nx_md5() is called on a VARCHAR whose size is more than 8000, it will fail with the SQL message
String or binary data would be truncated.
It is due to the hashbytes function.
A possible solution is to replace hashbytes by a function from the SQLCLR library: SQL#.Util_Hash
The md5HashString variable in sqlserver.sql.txt would be rewritten with
SUBSTRING(CONVERT(VARCHAR(34), SQL#.Util_Hash('MD5', CONVERT(VARBINARY(MAX), @string), 1), 3, 32)
Problem: how to detect that the SQLCLR library is installed in SQL Server?
Workaround: manually add this function if SQLCLR is not installed?