org.bouncycastle.crypto.generators

## Class Argon2BytesGenerator.FixedBlockPool

- java.lang.Object
- - org.bouncycastle.crypto.generators.Argon2BytesGenerator.FixedBlockPool

- All Implemented Interfaces:
    Argon2BytesGenerator.BlockPool
  Enclosing class:
    Argon2BytesGenerator

      public static class Argon2BytesGenerator.FixedBlockPool
      extends java.lang.Object
      implements Argon2BytesGenerator.BlockPool

  Bounded pool that recycles up to `maxBlocks` `Argon2BytesGenerator.Block` objects. Excess blocks returned via `#deallocate(Block)` are dropped and left for the garbage collector. Returned blocks are zeroised both on deallocation and again on allocation, so a recycled block is never observed with stale data.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FixedBlockPool(int maxBlocks)`

  - ### Method Summary

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

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FixedBlockPool

          public FixedBlockPool(int maxBlocks)

  - ### Method Detail

    - #### allocate

          public Argon2BytesGenerator.Block allocate()

      Specified by:
        `allocate` in interface `Argon2BytesGenerator.BlockPool`

    - #### deallocate

          public void deallocate(Argon2BytesGenerator.Block block)

      Specified by:
        `deallocate` in interface `Argon2BytesGenerator.BlockPool`