@Override
public ByteBuf encode(EncryptionKeyRequestMessage message) {
ByteBuf buffer = Unpooled.buffer();
VanillaByteBufUtils.writeString(buffer, message.getSessionId());
byte[] publicKey = message.getSecretArray();
buffer.writeShort((short) publicKey.length);
buffer.writeBytes(publicKey);
buffer.writeShort((short) message.getVerifyTokenArray().length);
buffer.writeBytes(message.getVerifyTokenArray());
return buffer;
}