This commit is contained in:
Isaac Parenteau
2019-07-27 11:50:55 -05:00
parent 79f913cc6d
commit d0fc6a7ddb

View File

@ -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])));
} }