public static char @NotNull [] decodePasswordAsCharArray(@Nullable String password) throws NumberFormatException {
    if (password == null || password.isEmpty()) {
      return new char[]{};
    }

    char[] result = new char[password.length() / 4];
    for (int i = 0, j = 0; i < password.length(); i += 4, j++) {
      int c = Integer.parseInt(password.substring(i, i + 4), 16);
      c ^= 0xdfaa;
      result[j] = new Character((char)c).charValue();
    }
    return result;
  }
public static char @NotNull [] decodePasswordAsCharArray(@Nullable String password)