Get multiplayer working
This commit is contained in:
parent
121075336f
commit
e193be5cd3
1 changed files with 4 additions and 9 deletions
|
@ -1,5 +1,7 @@
|
|||
package com.mojang.minecraft.server;
|
||||
|
||||
import dev.zontreck.ariaslib.util.Hashing;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
@ -11,14 +13,7 @@ public final class MPPassCalculator {
|
|||
this.salt = var1;
|
||||
}
|
||||
|
||||
public final String calcMPass(String var1) {
|
||||
try {
|
||||
String var3 = this.salt + var1;
|
||||
MessageDigest var4 = MessageDigest.getInstance("MD5");
|
||||
var4.update(var3.getBytes(), 0, var3.length());
|
||||
return (new BigInteger(1, var4.digest())).toString(16);
|
||||
} catch (NoSuchAlgorithmException var2) {
|
||||
throw new RuntimeException(var2);
|
||||
}
|
||||
public final String calcMPass(String username) {
|
||||
return Hashing.md5(this.salt + username);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue