Bouncy Castle Cryptography Library 1.85

org.bouncycastle.crypto.generators
Class Argon2BytesGenerator.FixedBlockPool

java.lang.Object
  extended byorg.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 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
Argon2BytesGenerator.FixedBlockPool(int maxBlocks)
           
 
Method Summary
 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

Argon2BytesGenerator.FixedBlockPool

public Argon2BytesGenerator.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

Bouncy Castle Cryptography Library 1.85