diff options
-rw-r--r-- | src/main/java/net/elytrium/limboauth/Settings.java | 2 | ||||
-rw-r--r-- | src/main/java/net/elytrium/limboauth/migration/MigrationHash.java | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/net/elytrium/limboauth/Settings.java b/src/main/java/net/elytrium/limboauth/Settings.java index 447d6a7..badc906 100644 --- a/src/main/java/net/elytrium/limboauth/Settings.java +++ b/src/main/java/net/elytrium/limboauth/Settings.java @@ -85,6 +85,8 @@ public class Settings extends Config { "MD5 - Basic md5 hash", "ARGON2 - Argon2 hash that looks like $argon2i$v=1234$m=1234,t=1234,p=1234$hash", "MOON_SHA256 - Moon SHA256(SHA256(password)) that looks like $SHA$hash (no salt)", + "SHA256_NO_SALT - SHA256(password) that looks like $SHA$hash (NexAuth)", + "SHA512_NO_SALT - SHA512(password) that looks like $SHA$hash (NexAuth)", }) public String MIGRATION_HASH = ""; @Comment("Available dimensions: OVERWORLD, NETHER, THE_END") diff --git a/src/main/java/net/elytrium/limboauth/migration/MigrationHash.java b/src/main/java/net/elytrium/limboauth/migration/MigrationHash.java index add41ca..669a82d 100644 --- a/src/main/java/net/elytrium/limboauth/migration/MigrationHash.java +++ b/src/main/java/net/elytrium/limboauth/migration/MigrationHash.java @@ -63,6 +63,14 @@ public enum MigrationHash { MOON_SHA256((hash, password) -> { String[] arr = hash.split("\\$"); // $SHA$hash return arr.length == 3 && arr[2].equals(MigrationHash.getDigest(MigrationHash.getDigest(password, "SHA-256"), "SHA-256")); + }), + SHA256_NO_SALT((hash, password) -> { + String[] arr = hash.split("\\$"); // $SHA$hash + return arr.length == 3 && arr[2].equals(MigrationHash.getDigest(password, "SHA-256")); + }), + SHA512_NO_SALT((hash, password) -> { + String[] arr = hash.split("\\$"); // $SHA$hash + return arr.length == 3 && arr[2].equals(MigrationHash.getDigest(password, "SHA-512")); }); final MigrationHashVerifier verifier; |