NettyEncryptingDecoder .java

net.minecraft.network.NettyEncryptingDecoder (class): members: decryptionCodec, decode. imports: MessageToMessageDecoder, ChannelHandlerContext, ByteBuf.

net.minecraft.networkclass24 linescommonextends MessageToMessageDecoder<ByteBuf>776 B

API Surface (1)

void decode(ChannelHandlerContext p_decode_1_, ByteBuf p_decode_2_, List<Object> p_decode_3_)

Fields & Constants (1)

decryptionCodec

Code Graph: Dependencies (1)

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

Full Source

NettyEncryptingDecoder.java24 lines · MCP 1.8.9 · verbatimOriginal ↗
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
import javax.crypto.ShortBufferException;
9
10
public class NettyEncryptingDecoder extends MessageToMessageDecoder<ByteBuf>
11
{
12
    private final NettyEncryptionTranslator decryptionCodec;
13
14
    public NettyEncryptingDecoder(Cipher cipher)
15
    {
16
        this.decryptionCodec = new NettyEncryptionTranslator(cipher);
17
    }
18
19
    protected void decode(ChannelHandlerContext p_decode_1_, ByteBuf p_decode_2_, List<Object> p_decode_3_) throws ShortBufferException, Exception
20
    {
21
        p_decode_3_.add(this.decryptionCodec.decipher(p_decode_1_, p_decode_2_));
22
    }
23
}
24

Deobfuscated MCP 1.8.9 source of NettyEncryptingDecoder from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/NettyEncryptingDecoder.java), stored verbatim.