(String encryptedPassword)
| 131 | } |
| 132 | |
| 133 | private void writeToFile(String encryptedPassword) { |
| 134 | try (BufferedWriter writer = new BufferedWriter(new FileWriter(ENCRYPTED_PASSWORD_FILE))) { |
| 135 | writer.write(encryptedPassword); |
| 136 | } catch (IOException e) { |
| 137 | JOptionPane.showMessageDialog(this, "Failed to write encrypted password to file", "Error", JOptionPane.ERROR_MESSAGE); |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | private String decrypt(String masterPassword, String encryptedPassword) { |
| 142 | try { |