Added Checkstyle to build process and fixing checkstyle to all com.src.jpexs classes

This commit is contained in:
Jindra Petřík
2023-10-09 08:57:05 +02:00
parent b6e8ca0d67
commit dc5e50813f
789 changed files with 23773 additions and 22843 deletions

View File

@@ -62,8 +62,16 @@ public class MD5Crypt {
sb.append(SALT_CHARS.charAt(rnd.nextInt(SALT_CHARS.length())));
}
return sb.toString();
}
public static String cryptApache(String password, int saltLength) {
return crypt(password, generateSalt(saltLength), MAGIC_APACHE);
}
public static String cryptApache(String password, String salt) {
return crypt(password, salt, MAGIC_APACHE);
}
public static String crypt(String password, int saltLength, String magic) {
return crypt(password, generateSalt(saltLength), magic);
}
@@ -71,19 +79,11 @@ public class MD5Crypt {
public static String crypt(String password, int saltLength) {
return crypt(password, generateSalt(saltLength), MAGIC);
}
public static String cryptApache(String password, int saltLength) {
return crypt(password, generateSalt(saltLength), MAGIC_APACHE);
}
public static String crypt(String password, String salt) {
return crypt(password, salt, MAGIC);
}
public static String cryptApache(String password, String salt) {
return crypt(password, salt, MAGIC_APACHE);
}
private static String crypt(String password, String salt, String magic) {
if (salt.startsWith(magic)) {
@@ -104,7 +104,7 @@ public class MD5Crypt {
return null;
}
b.update(passwordBytes); //Add the password to digest B
b.update(saltBytes);//Add the salt to digest B
b.update(saltBytes); //Add the salt to digest B
b.update(passwordBytes); //Add the password to digest B
byte[] digest_b = b.digest(); //Finish MD5 digest B