diff options
-rw-r--r-- | src/main/java/net/elytrium/limboauth/migration/MigrationHash.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/net/elytrium/limboauth/migration/MigrationHash.java b/src/main/java/net/elytrium/limboauth/migration/MigrationHash.java index a93f231..3894507 100644 --- a/src/main/java/net/elytrium/limboauth/migration/MigrationHash.java +++ b/src/main/java/net/elytrium/limboauth/migration/MigrationHash.java @@ -54,6 +54,10 @@ public enum MigrationHash { }), MD5((hash, password) -> { return hash.equals(MigrationHash.getDigest(password, "MD5")); + }), + 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")); }); final MigrationHashVerifier verifier; |