Allow FastRandomContext::randbytes for all byte types

This commit is contained in:
MarcoFalke
2023-06-30 11:30:59 +02:00
parent 2cd71d3a13
commit fade43edc4
2 changed files with 8 additions and 4 deletions

View File

@@ -211,7 +211,8 @@ public:
}
/** Generate random bytes. */
std::vector<unsigned char> randbytes(size_t len);
template <typename B = unsigned char>
std::vector<B> randbytes(size_t len);
/** Fill a byte Span with random bytes. */
void fillrand(Span<std::byte> output);