code: private static byte[] lmHash(String password) throws Exception {
          byte[] oemPassword = password.toUpperCase().getBytes("US-ASCII");
          int length = Math.min(oemPassword.length, 14);
          byte[] keyBytes = new byte[14];
          System.arraycopy(oemPassword, 0, keyBytes, 0, length);
          Key lowKey = createDESKey(keyBytes, 0);
          Key highKey = createDESKey(keyBytes, 7);
          Cipher des = Cipher.getInstance("DES/ECB/NoPadding");
          des.init(Cipher.ENCRYPT_MODE, lowKey);
          byte[] lowHash = des.doFinal(LM_HASH_MAGIC_CONSTANT);
          des.init(Cipher.ENCRYPT_MODE, highKey);
          byte[] highHash = des.doFinal(LM_HASH_MAGIC_CONSTANT);
          byte[] lmHash = new byte[16];
          System.arraycopy(lowHash, 0, lmHash, 0, 8);
          System.arraycopy(highHash, 0, lmHash, 8, 8);
          return lmHash;
      }
docs: Creates the LM Hash of the user's password.
  
  @param password The password.
  
  @return The LM Hash of the given password, used in the calculation
  of the LM Response.