The following location contains PostgreSQL C functions for generatinglanmanager and ntlm password hashes. Feel free to use as you see fit.
http://www.yellowbank.com/code/PostgreSQL/y_ntlm/
Best.
--Ron Petersonhttps://www.yellowbank.com/