function generateSecretKey(session, packet) { const cipherPublicKey = packet.readString(); const sharedKey = HabboEncryption.calculateDiffieHellmanSharedKey(cipherPublicKey); if (sharedKey.equals(BigInteger.ZERO)) { return; } session.enableRC4(sharedKey.toByteArray()); session.sendPacket(new CompleteDiffieHandshakeComposer(HabboEncryption.PublicKey.toString())); }