Skip to content

Instantly share code, notes, and snippets.

@Jakobg1215
Last active Sep 14, 2021
Embed
What would you like to do?
encription
const playerdata = JSON.parse(data.toString());
const encrypt = buffer => {
const cipher = createCipheriv(
'aes-128-gcm',
Shared_Secret_Decypted,
Shared_Secret_Decypted,
);
return cipher.update(buffer);
};
const Login_Success = new packet();
Login_Success.writeUUID(playerdata.id);
Login_Success.writeString(playerdata.name);
socket.write(encrypt(Login_Success.buildPacket(0x02)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment