2025-11-24 22:52:51 +03:00

31 lines
827 B
Java

/*
* Decompiled with CFR 0.152.
*
* Could not load the following classes:
* io.netty.buffer.ByteBuf
* io.netty.channel.ChannelHandlerContext
* io.netty.handler.codec.MessageToMessageDecoder
*/
package net.minecraft.network;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToMessageDecoder;
import java.util.List;
import javax.crypto.Cipher;
import net.minecraft.network.CipherBase;
public class CipherDecoder
extends MessageToMessageDecoder<ByteBuf> {
private final CipherBase cipher;
public CipherDecoder(Cipher cipher) {
this.cipher = new CipherBase(cipher);
}
protected void decode(ChannelHandlerContext ctx, ByteBuf msg, List<Object> out) throws Exception {
out.add(this.cipher.decipher(ctx, msg));
}
}