This commit is contained in:
Isaac Parenteau committed 2019-07-27 11:51:27 -05:00
1 parent ca90361fcf
commit 3e8dc5fb00
1 file changed
+1 -1
@@ -154,7 +154,7 @@ public class AES {
throw new IllegalArgumentException("No args provided. Need password as argument"); throw new IllegalArgumentException("No args provided. Need password as argument");
} }
if (args.length % 2 == 0) { if (args.length % 2 == 0) {
System.out.println(AES.createInstance(String.valueOf(args[1])).encrypt(String.valueOf(args[0]))); System.out.println(AES.createInstance(String.valueOf(args[1])).decrypt(String.valueOf(args[0])));
} else { } else {
System.out.println(AES.createInstance().encrypt(String.valueOf(args[0]))); System.out.println(AES.createInstance().encrypt(String.valueOf(args[0])));
} }