<p>In my application I need to hash a string before I save it to a text file. Does anyone know how to do that?</p>

You can try with CriptoASP. Don't mind about the 'ASP' in the name, it's an ActiveX DLL you can instantiate from VB6. It provides methods for generate random numbers, hashes with MD2, MD4, MD5 and SHA and some kind of encryption/decryption.
You can download it from
CriptoASP
I'm sorry, web's language is in spanish, but I think you can undertand the very easy use of the COM with the examples at bottom of
Doc. for CriptoASP
, just change
Server.CreateObject
with the new object sentence in VB6.
Tell me if you want a translate of the examples or documentation.
To save it to a text file you can use FSO (File System Object).