mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-30 10:47:33 +02:00
Document origin of signing keys
This commit is contained in:
@ -153,6 +153,7 @@ class EncryptionUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Signature verifier = Signature.getInstance("SHA1withRSA");
|
Signature verifier = Signature.getInstance("SHA1withRSA");
|
||||||
|
// key of the signer
|
||||||
verifier.initVerify(mojangSessionKey);
|
verifier.initVerify(mojangSessionKey);
|
||||||
verifier.update(toSignable(clientKey).getBytes(StandardCharsets.US_ASCII));
|
verifier.update(toSignable(clientKey).getBytes(StandardCharsets.US_ASCII));
|
||||||
return verifier.verify(clientKey.getSignature());
|
return verifier.verify(clientKey.getSignature());
|
||||||
@ -161,6 +162,7 @@ class EncryptionUtil {
|
|||||||
public static boolean verifySignedNonce(byte[] nonce, PublicKey clientKey, long signatureSalt, byte[] signature)
|
public static boolean verifySignedNonce(byte[] nonce, PublicKey clientKey, long signatureSalt, byte[] signature)
|
||||||
throws NoSuchAlgorithmException, InvalidKeyException, SignatureException {
|
throws NoSuchAlgorithmException, InvalidKeyException, SignatureException {
|
||||||
Signature verifier = Signature.getInstance("SHA256withRSA");
|
Signature verifier = Signature.getInstance("SHA256withRSA");
|
||||||
|
// key of the signer
|
||||||
verifier.initVerify(clientKey);
|
verifier.initVerify(clientKey);
|
||||||
|
|
||||||
verifier.update(nonce);
|
verifier.update(nonce);
|
||||||
|
Reference in New Issue
Block a user