Code/net/minecraft/network/CipherEncoder.java

18 lines
573 B
Java
Raw Permalink Normal View History

2025-07-01 06:20:03 +00:00
package net.minecraft.network;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
import javax.crypto.Cipher;
public class CipherEncoder extends MessageToByteEncoder<ByteBuf> {
private final CipherBase cipher;
public CipherEncoder(Cipher p_129425_) {
this.cipher = new CipherBase(p_129425_);
}
protected void encode(ChannelHandlerContext p_129427_, ByteBuf p_129428_, ByteBuf p_129429_) throws Exception {
this.cipher.encipher(p_129428_, p_129429_);
}
}