CipherDecoder .java

net.minecraft.network.CipherDecoder (class, 20 lines): members: cipher, decode. imports: MessageToMessageDecoder, ChannelHandlerContext, ByteBuf.

net.minecraft.networkclass20 linescommonextends MessageToMessageDecoder<ByteBuf>578 B

API Surface (1)

void decode(final ChannelHandlerContext ctx, final ByteBuf msg, final List<Object> out)

Fields & Constants (1)

cipher

Code Graph: Dependencies (1)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

CipherDecoder.java20 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.network;
2
3
import io.netty.buffer.ByteBuf;
4
import io.netty.channel.ChannelHandlerContext;
5
import io.netty.handler.codec.MessageToMessageDecoder;
6
import java.util.List;
7
import javax.crypto.Cipher;
8
9
public class CipherDecoder extends MessageToMessageDecoder<ByteBuf> {
10
	private final CipherBase cipher;
11
12
	public CipherDecoder(final Cipher cipher) {
13
		this.cipher = new CipherBase(cipher);
14
	}
15
16
	protected void decode(final ChannelHandlerContext ctx, final ByteBuf msg, final List<Object> out) throws Exception {
17
		out.add(this.cipher.decipher(ctx, msg));
18
	}
19
}
20

Decompiled Minecraft 26.3 source of CipherDecoder (net/minecraft/network/CipherDecoder.java) with Mojang official mappings, stored verbatim on the site.