summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorSamuel Tardieu <[email protected]>2022-11-13 10:03:04 +0100
committerSamuel Tardieu <[email protected]>2022-11-13 10:03:06 +0100
commit7445ee40f8930c2f72e87d5809d2ff584b0c4d30 (patch)
treecca8308f9d799b2b14927d9c9f5f3d9ee76cc52d /src/config.rs
parentd0baa23f9a15152a370092e955c2cf87891c26e7 (diff)
downloadvaultwarden-7445ee40f8930c2f72e87d5809d2ff584b0c4d30.tar.gz
vaultwarden-7445ee40f8930c2f72e87d5809d2ff584b0c4d30.zip
Remove get_random_64()
Its uses are replaced by get_randm_bytes() or encode_random_bytes().
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs
index 9c31d231..4f2779d9 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -981,8 +981,7 @@ impl Config {
if let Some(akey) = self._duo_akey() {
akey
} else {
- let akey = crate::crypto::get_random_64();
- let akey_s = data_encoding::BASE64.encode(&akey);
+ let akey_s = crate::crypto::encode_random_bytes::<64>(data_encoding::BASE64);
// Save the new value
let builder = ConfigBuilder {