Just pass a string to 'encrypt' and an int specifying the long of the result string (max: 32).
I need to aply a substring to extrac the 'hex' part (0x).
for example:
select dbo.fn_MD5('hello', 32) as md5, returns: '5d41402abc4b2a76b9719d911017c592'
select dbo.fn_MD5('hello', 31) as md5, returns: '5d41402abc4b2a76b9719d911017c59'
select dbo.fn_MD5('hello', 30) as md5, returns: '5d41402abc4b2a76b9719d911017c5'