Interface NettyDecryptor
- All Superinterfaces:
AutoCloseable, 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 Summary
Methods inherited from interface 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.
-