Open-source multiplayer game server compatible with the RuneScape client
https://www.openrs2.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
404 B
13 lines
404 B
package org.openrs2.protocol.js5
|
|
|
|
import io.netty.buffer.ByteBuf
|
|
import io.netty.channel.ChannelHandlerContext
|
|
import io.netty.handler.codec.MessageToMessageDecoder
|
|
|
|
public class XorDecoder : MessageToMessageDecoder<ByteBuf>(ByteBuf::class.java) {
|
|
public var key: Int = 0
|
|
|
|
override fun decode(ctx: ChannelHandlerContext, msg: ByteBuf, out: MutableList<Any>) {
|
|
out += msg.xor(key)
|
|
}
|
|
}
|
|
|