aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/util/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/util/mod.rs b/core/src/util/mod.rs
index a3c3f50..ec59e1c 100644
--- a/core/src/util/mod.rs
+++ b/core/src/util/mod.rs
@@ -13,6 +13,11 @@ pub fn random_32() -> u32 {
OsRng.gen()
}
+/// Generates and returns a random u64 using `rand::rngs::OsRng`.
+pub fn random_64() -> u64 {
+ OsRng.gen()
+}
+
/// Generates and returns a random u16 using `rand::rngs::OsRng`.
pub fn random_16() -> u16 {
OsRng.gen()