Interface NettyDecryptor

All Superinterfaces:
AutoCloseable, Decryptor

public interface NettyDecryptor extends Decryptor
Factory for creating Netty-enabled decryptors and encryptors.

Creates instances of NettyDecryptor and NettyEncryptor that support direct operations on Netty ByteBuf for improved performance and reduced allocations.

Requirements: This requires io.netty:netty-buffer to be available on the classpath. Loading any classes from this package without Netty will result in ClassNotFoundException.

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.