diff --git a/src/lib/rng/rng.h b/src/lib/rng/rng.h index b96e2f4633e..1ee3db9f714 100644 --- a/src/lib/rng/rng.h +++ b/src/lib/rng/rng.h @@ -208,6 +208,16 @@ class BOTAN_PUBLIC_API(2, 0) RandomNumberGenerator { return result; } + /** + * Create a std::array of @p bytes random bytes + */ + template + std::array random_array() { + std::array result; + random_vec(result); + return result; + } + /** * Return a random byte * @return random byte