container: root: macro: add bitcoin plugin support

- Adds support to existing macros for bitcoin's RNG via `dfi`'s `Random`
  * Currently only supports one of bitcoin's RNG's (`FastRandomContext`)
This commit is contained in:
2025-11-14 12:38:43 -08:00
parent 2268ae8083
commit 0bf4c359b1
3 changed files with 48 additions and 0 deletions

View File

@@ -351,6 +351,15 @@ class Random final
const std::string timestamp{common::make_timestamp()};
#ifdef __DFI_PLUGIN_BITCOIN__
data.title = "Bitcoin_FastRandomContext_32_RNG_" + timestamp;
random(data, []() -> uint32_t {
return common::crypto::bitcoin::g_Random->generate();
});
// TODO(afiore): uint64_t (requires canvas-related refactor)
#endif
data.title = "Botan_RNG_" + timestamp;
random(data, []() -> uint32_t {
return common::crypto::botan::g_Random->generate();