MCPcopy Index your code
hub / github.com/darksolopic/PasswordManagerGUI / actionPerformed

Method actionPerformed

PasswordManagerGUI.java:161–179  ·  view source on GitHub ↗
(ActionEvent e)

Source from the content-addressed store, hash-verified

159 }
160
161 @Override
162 public void actionPerformed(ActionEvent e) {
163 if (e.getActionCommand().equals("Encrypt")) {
164 String masterPassword = masterPasswordField.getText();
165 String password = passwordField.getText();
166 String encryptedPassword = encrypt(masterPassword, password);
167 if (encryptedPassword != null) {
168 encryptedPasswordField.setText(encryptedPassword);
169 encryptedPasswordfileField.setText("Encrypted! Check file.");
170 }
171 } else if (e.getActionCommand().equals("Decrypt")) {
172 String masterPassword = masterPasswordField.getText();
173 String encryptedPassword = encryptedPasswordField.getText();
174 String decryptedPassword = decrypt(masterPassword, encryptedPassword);
175 if (decryptedPassword != null) {
176 decryptedPasswordField.setText(decryptedPassword);
177 }
178 }
179 }
180
181 public static void main(String[] args) {
182 SwingUtilities.invokeLater(PasswordManagerGUI::new);

Callers

nothing calls this directly

Calls 2

encryptMethod · 0.95
decryptMethod · 0.95

Tested by

no test coverage detected