Another day, another module! This time, it’s Random
number generators!
The repo has of course also been updated, with the following:
- Added
Botan.Random
(the RNG interface)- The
Random
random number generator opaque type - The
RandomType
type for specifying the type ofRandom
randomInit
andrandomInitWith
functions to create aRandom
randomGet
andsystemRandomGet
functions for gettingn
bytes of random.randomReseed
andrandomReseedFromRandom
reseeding functionsrandomAddEntropy
function for adding your own bytes of entropy- NOTE:
botan_rng_init_custom
function is not implemented. It looks complicated, for now.
- The
- Switched a few
alloc
tomalloc
because long-lived references were being freed* - Added pure
hashWith
convenience method
* If someone could sanity check the
ForeignPtr
initialization pattern I’m using, I would appreciate it.
If there are any particular modules that you would like me to tackle next, or if you would instead like me to focus a little more on developing some higher-level bindings to Hash
/ Random
, please let me know. Otherwise, I’m following the Botan FFI header which means that message authentication codes aka MAC
would be the next module. I’m open to listening to the community on this