Securemem provides memory chunks that allow auto-scrubbing of the memory after use, and constant time equality.
Documentation: securemem on hackage
Interacting with securemem
It’s recommended to use the Byteable instance when providing an interface that takes a securemem. It allow legacy code, and work in progress code to interface with securemem more easily.
On older base, the memory is not scrubbed: upgrade your GHC to 7.6.0 or above.
- add a custom memory allocator that give mlocked memory chunks.