Interface Argon2BytesGenerator.BlockPool
- All Known Implementing Classes:
Argon2BytesGenerator.FixedBlockPool
- Enclosing class:
Argon2BytesGenerator
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.
The generator zeroises a block before passing it to
deallocate(Block), so an implementation never receives
password-derived data and need not clear anything itself; a block it
hands out from allocate() may be returned as it came back.
Argon2BytesGenerator.Block.clear() is public for an implementation that wants to
zeroise blocks it obtained some other way. Size a pool that is to
recycle a whole run with
Argon2BytesGenerator.getBlockCount(int, int).
-
Method Summary
-
Method Details
-
allocate
Argon2BytesGenerator.Block allocate() -
deallocate
-