Needed to generate a quick NTLM hash for integration within PyCUDA for a GPU based cracker. While combing through the RFC and found that writing this was extremely easy. Anyways here’s a quick example on creating an NTLM hash with 3 lines of Python.
import hashlib,binascii
hash = hashlib.new('md4', "thisismyhashvalue".encode('utf-16le')).digest()
print binascii.hexlify(hash)