@staticmethod<EOL><INDENT>def _calc_resp(password_hash, server_challenge):<DEDENT>
<EOL>password_hash += b'<STR_LIT:\x00>' * (<NUM_LIT> - len(password_hash))<EOL>res = b'<STR_LIT>'<EOL>dobj = DES(DES.key56_to_key64(password_hash[<NUM_LIT:0>:<NUM_LIT:7>]))<EOL>res = res + dobj.encrypt(server_challenge[<NUM_LIT:0>:<NUM_LIT:8>])<EOL>dobj = DES(DES.key56_to_key64(password_hash[<NUM_LIT:7>:<NUM_LIT>]))<EOL>res = res + dobj.encrypt(server_challenge[<NUM_LIT:0>:<NUM_LIT:8>])<EOL>dobj = DES(DES.key56_to_key64(password_hash[<NUM_LIT>:<NUM_LIT>]))<EOL>res = res + dobj.encrypt(server_challenge[<NUM_LIT:0>:<NUM_LIT:8>])<EOL>return res<EOL>
Generate the LM response given a 16-byte password hash and the
challenge from the CHALLENGE_MESSAGE

:param password_hash: A 16-byte password hash
:param server_challenge: A random 8-byte response generated by the
    server in the CHALLENGE_MESSAGE
:return res: A 24-byte buffer to contain the LM response upon return