code: public static byte[] encodePassword(String password) throws WIMSystemException {
          try {
              return ("\"" + password + "\"").getBytes("UTF-16LE");
          } catch (Exception e) {
              String msg = Tr.formatMessage(tc, WIMMessageKey.GENERIC, WIMMessageHelper.generateMsgParms(e.getMessage()));
              throw new WIMSystemException(WIMMessageKey.GENERIC, msg, e);
          }
      }
docs: Encode the input password from String format to special byte array format so that it can be stored in
  attribute <code>unicodePwd</code> in Active Directory.
  
  @param password The password to be encoded.
  
  @return The encoded byte array which can be stored in <code>unicodePwd</code> attribute in Active Directory.