diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/EncryptionUtil.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/EncryptionUtil.java index 713fa68a..ef210d78 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/EncryptionUtil.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/EncryptionUtil.java @@ -153,6 +153,7 @@ class EncryptionUtil { } Signature verifier = Signature.getInstance("SHA1withRSA"); + // key of the signer verifier.initVerify(mojangSessionKey); verifier.update(toSignable(clientKey).getBytes(StandardCharsets.US_ASCII)); return verifier.verify(clientKey.getSignature()); @@ -161,6 +162,7 @@ class EncryptionUtil { public static boolean verifySignedNonce(byte[] nonce, PublicKey clientKey, long signatureSalt, byte[] signature) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException { Signature verifier = Signature.getInstance("SHA256withRSA"); + // key of the signer verifier.initVerify(clientKey); verifier.update(nonce);