Fix the compilation

This commit is contained in:
Kerollmops 2023-04-11 15:55:39 +02:00 committed by Clément Renault
parent a109802d45
commit a3cf104736
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
2 changed files with 4 additions and 3 deletions

View file

@ -310,6 +310,7 @@ pub const MASTER_KEY_MIN_SIZE: usize = 16;
const MASTER_KEY_GEN_SIZE: usize = 32;
pub fn generate_master_key() -> String {
use base64::Engine;
use rand::rngs::OsRng;
use rand::RngCore;
@ -320,5 +321,5 @@ pub fn generate_master_key() -> String {
// let's encode the random bytes to base64 to make them human-readable and not too long.
// We're using the URL_SAFE alphabet that will produce keys without =, / or other unusual characters.
base64::encode_config(buf, base64::URL_SAFE_NO_PAD)
base64::engine::general_purpose::URL_SAFE_NO_PAD.encode(buf)
}