This commit is contained in:
Jephté Clain 2014-02-14 16:47:39 +04:00
parent 6d2d02c22c
commit 118686346b
1 changed files with 6 additions and 6 deletions

View File

@ -4898,17 +4898,17 @@ public class upassword {
die(aeskeyfile + ": Refus d'écraser un fichier existant", null);
}
String password = null;
if (args.length > 0) password = args[0];
String salt = null;
if (args.length > 1) salt = args[1];
byte[] key = null;
try {
String password = null;
if (args.length > 0) password = args[0];
byte[] salt = null;
if (args.length > 1) salt = args[1].getBytes(UTF_8);
if (password != null && salt != null) {
key = AESEnc.genkey();
} else {
key = AESEnc.genkey(password, salt.getBytes(UTF_8), -1);
key = AESEnc.genkey(password, salt, -1);
}
} catch (Exception e) {
die(null, e);