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
Randomrandom number generator opaque type - The
RandomTypetype for specifying the type ofRandom randomInitandrandomInitWithfunctions to create aRandomrandomGetandsystemRandomGetfunctions for gettingnbytes of random.randomReseedandrandomReseedFromRandomreseeding functionsrandomAddEntropyfunction for adding your own bytes of entropy- NOTE:
botan_rng_init_customfunction is not implemented. It looks complicated, for now.
- The
- Switched a few
alloctomallocbecause long-lived references were being freed* - Added pure
hashWithconvenience method
* If someone could sanity check the
ForeignPtrinitialization 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 ![]()
