Interface NettyDecryptor

All Superinterfaces:
AutoCloseable, Decryptor

public interface NettyDecryptor extends Decryptor
A Decryptor that can also decrypt directly between Netty ByteBufs.

Both buffers must be direct. The encrypted frame is read from the readable bytes of encryptedFrame, and the decrypted frame is written at the writer index of frame, which is advanced on success.

See Also:
  • Method Details

    • decrypt

      int decrypt(MediaType mediaType, io.netty.buffer.ByteBuf encryptedFrame, io.netty.buffer.ByteBuf frame)
      Decrypts an encrypted frame into Netty ByteBuf.
      Parameters:
      mediaType - The type of media.
      encryptedFrame - The input ByteBuf containing the encrypted frame.
      frame - The output ByteBuf to write the decrypted frame into.
      Returns:
      The number of bytes written to frame on success, or a negative error code on failure.