Argon2BytesGenerator.BlockPool (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.crypto.generators

## Interface Argon2BytesGenerator.BlockPool

- All Known Implementing Classes:
    Argon2BytesGenerator.FixedBlockPool
  Enclosing class:
    Argon2BytesGenerator

      public static interface Argon2BytesGenerator.BlockPool

  Strategy for allocating and recycling Argon2 `Argon2BytesGenerator.Block` objects.

  An implementation may simply return fresh blocks from `allocate()` (the default behaviour) or pool them so the underlying `long[]` buffers can be reused across successive `generateBytes` calls. Implementations must accept matching allocate/deallocate pairs - the generator does not guard against double-deallocation of the same block.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Argon2BytesGenerator.Block` | `allocate()`
    `void` | `deallocate(Argon2BytesGenerator.Block block)`

- - ### Method Detail

    - #### allocate

          Argon2BytesGenerator.Block allocate()

    - #### deallocate

          void deallocate(Argon2BytesGenerator.Block block)