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

30 lines
781 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.MessageToByteEncoder
*/
package net.minecraft.network;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
import javax.crypto.Cipher;
import net.minecraft.network.CipherBase;
public class CipherEncoder
extends MessageToByteEncoder<ByteBuf> {
private final CipherBase cipher;
public CipherEncoder(Cipher cipher) {
this.cipher = new CipherBase(cipher);
}
protected void encode(ChannelHandlerContext ctx, ByteBuf msg, ByteBuf out) throws Exception {
this.cipher.encipher(msg, out);
}
}