Interface EncryptionByteBufferPool


public interface EncryptionByteBufferPool
Provides pools of byte buffers optimized for encryption operations. This interface manages both source and destination buffers that comply with cryptographic requirements, handling proper chunk sizing and output buffer allocation for various encryption algorithms.

Implementations must ensure buffers are correctly sized for:

  • Input data chunking (e.g., AES block alignment)
  • Output size calculations (including padding overhead)
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a pool of destination buffers for encrypted output.
    Returns a pool of source buffers for encryption input data.
  • Method Details

    • encryptedBlocksPool

      ByteBufferPool encryptedBlocksPool()
      Returns a pool of source buffers for encryption input data. These buffers are sized to meet algorithm-specific requirements (e.g., 16-byte multiples for AES).

      Buffers from this pool will automatically satisfy the input size constraints of the configured encryption algorithm.

      Returns:
      the pool of properly-sized input buffers
    • dataPool

      ByteBufferPool dataPool()
      Returns a pool of destination buffers for encrypted output. Buffer sizes are calculated to accommodate:
      • Encrypted data expansion due to padding
      • Algorithm-specific output sizing rules

      Output buffers are sized based on encryptedBlocksPool() input buffers and the active encryption parameters.

      Returns:
      the pool of properly-sized output buffers
      See Also: