def _lmowfv1(password):
<EOL>if re.match(r'<STR_LIT>', password):<EOL><INDENT>lm_hash = binascii.unhexlify(password.split('<STR_LIT::>')[<NUM_LIT:0>])<EOL>return lm_hash<EOL><DEDENT>password = password.upper()<EOL>lm_pw = password.encode('<STR_LIT:utf-8>')<EOL>padding_size = <NUM_LIT:0> if len(lm_pw) >= <NUM_LIT> else (<NUM_LIT> - len(lm_pw))<EOL>lm_pw += b"<STR_LIT:\x00>" * padding_size<EOL>magic_str = b"<STR_LIT>"  <EOL>res = b"<STR_LIT>"<EOL>dobj = DES(DES.key56_to_key64(lm_pw[<NUM_LIT:0>:<NUM_LIT:7>]))<EOL>res += dobj.encrypt(magic_str)<EOL>dobj = DES(DES.key56_to_key64(lm_pw[<NUM_LIT:7>:<NUM_LIT>]))<EOL>res += dobj.encrypt(magic_str)<EOL>return res<EOL>
[MS-NLMP] v28.0 2016-07-14

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

:param password: The password or hash of the user we are trying to
    authenticate with
:return res: A Lan Manager hash of the password supplied