import hashlib


def _ntowfv1(password):
    """
    [MS-NLMP] v28.0 2016-07-14

    3.3.1 NTLM v1 Authentication
    Same function as NTOWFv1 in document to create a one way hash of the password. Only
    used in NTLMv1 auth without session security

    :param password: The password of the user we are trying to authenticate with
    :return digest: An NT hash of the password supplied
    """

    digest = hashlib.new('md4', password.encode('utf-16le')).digest()
    return digest