docs: def create_LM_hashed_password_v1(passwd):
      """create LanManager hashed password"""
  
      # if the passwd provided is already a hash, we just return the first half
      if re.match(r'^[\w]{32}:[\w]{32}$', passwd):
          return binascii.unhexlify(passwd.split(':')[0])
  
      # fix the password length to 14 bytes
      passwd = passwd.upper()
      lm_pw = passwd + '\0' * (14 - len(passwd))
      lm_pw = passwd[0:14]
  
      # do hash
      magic_str = b"KGS!@#$%"  # page 57 in [MS-NLMP]
  
      res = b''
      dobj = des.DES(lm_pw[0:7])
      res = res + dobj.encrypt(magic_str)
  
      dobj = des.DES(lm_pw[7:14])
      res = res + dobj.encrypt(magic_str)
  
      return res