🎨 Move struct definition to a proper place

refactoring/split-modules
German Lashevich 6 years ago
parent a92d82a6c8
commit aab924d976
No known key found for this signature in database
GPG Key ID: 3446FAE369C9A8B4

@ -14,6 +14,11 @@ use rand::{OsRng, Rng};
const DATABASE_VERSION: u8 = 1;
pub struct JsonDatabase {
file_path: PathBuf,
secret_fn: &'static Fn() -> String,
}
// Database implementation for JSON database
impl Database for JsonDatabase {
fn get_applications(&self) -> HashMap<String, TOTP> {
@ -39,11 +44,6 @@ struct DatabaseContentSchema {
applications: HashMap<String, TOTP>,
}
pub struct JsonDatabase {
file_path: PathBuf,
secret_fn: &'static Fn() -> String,
}
const IV_SIZE: usize = 16;
const KEY_SIZE: usize = 32;
impl JsonDatabase {

Loading…
Cancel
Save