create ExternalSettings then move BCRYPT_LOG2_ROUND to it (fix build work 4)
This commit is contained in:
parent
7ba3d46416
commit
20f0bb1984
@ -62,10 +62,6 @@ public final class HooksSettings implements SettingsHolder {
|
||||
public static final Property<List<String>> MYSQL_OTHER_USERNAME_COLS =
|
||||
newListProperty("ExternalBoardOptions.mySQLOtherUsernameColumns");
|
||||
|
||||
@Comment("How much log2 rounds needed in BCrypt (do not change if you do not know what it does)")
|
||||
public static final Property<Integer> BCRYPT_LOG2_ROUND =
|
||||
newProperty("ExternalBoardOptions.bCryptLog2Round", 12);
|
||||
|
||||
@Comment("phpBB table prefix defined during the phpBB installation process")
|
||||
public static final Property<String> PHPBB_TABLE_PREFIX =
|
||||
newProperty("ExternalBoardOptions.phpbbTablePrefix", "phpbb_");
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
package fr.xephi.authme.settings.properties;
|
||||
|
||||
import ch.jalu.configme.Comment;
|
||||
import ch.jalu.configme.SettingsHolder;
|
||||
import ch.jalu.configme.properties.Property;
|
||||
|
||||
import static ch.jalu.configme.properties.PropertyInitializer.newProperty;
|
||||
|
||||
/**
|
||||
* ExternalSettings
|
||||
*
|
||||
* @author TheFloodDragon
|
||||
* @since 2024/7/11 21:39
|
||||
*/
|
||||
public final class ExternalSettings implements SettingsHolder {
|
||||
|
||||
@Comment("How much log2 rounds needed in BCrypt (do not change if you do not know what it does)")
|
||||
public static final Property<Integer> BCRYPT_LOG2_ROUND =
|
||||
newProperty("ExternalBoardOptions.bCryptLog2Round", 12);
|
||||
|
||||
}
|
||||
@ -2,7 +2,7 @@ package fr.xephi.authme.security.crypts;
|
||||
|
||||
import at.favre.lib.crypto.bcrypt.BCrypt.Version;
|
||||
import fr.xephi.authme.settings.Settings;
|
||||
import fr.xephi.authme.settings.properties.HooksSettings;
|
||||
import fr.xephi.authme.settings.properties.ExternalSettings;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
@ -17,7 +17,7 @@ public class BCrypt extends BCryptBasedHash {
|
||||
}
|
||||
|
||||
private static BCryptHasher createHasher(Settings settings) {
|
||||
int bCryptLog2Rounds = settings.getProperty(HooksSettings.BCRYPT_LOG2_ROUND);
|
||||
int bCryptLog2Rounds = settings.getProperty(ExternalSettings.BCRYPT_LOG2_ROUND);
|
||||
return new BCryptHasher(Version.VERSION_2A, bCryptLog2Rounds);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user