From a380e0720bfc1c3d94a7bde3d860336e2f0b8ec3 Mon Sep 17 00:00:00 2001 From: Souvlakis Date: Fri, 1 Apr 2022 00:13:38 +0300 Subject: Add MoonAuth hash support --- src/main/java/net/elytrium/limboauth/migration/MigrationHash.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/java/net/elytrium/limboauth') 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; -- cgit