diff options
Diffstat (limited to 'src/rng/rng.h')
-rw-r--r-- | src/rng/rng.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rng/rng.h b/src/rng/rng.h index 687f98d13..e024eeb59 100644 --- a/src/rng/rng.h +++ b/src/rng/rng.h @@ -32,6 +32,13 @@ class BOTAN_DLL RandomNumberGenerator */ virtual void randomize(byte output[], u32bit length) = 0; + SecureVector<byte> random_vec(u32bit bytes) + { + SecureVector<byte> output(bytes); + randomize(&output[0], output.size()); + return output; + } + /** * Return a random byte * @return random byte |