Package moe.kyokobot.libdave.netty
Interface NettyDecryptor
- All Superinterfaces:
AutoCloseable,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 Summary
Methods inherited from interface moe.kyokobot.libdave.Decryptor
close, decrypt, decrypt, getMaxPlaintextByteSize, transitionToKeyRatchet, transitionToPassthroughMode
-
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
frameon success, or a negative error code on failure.
-