diff --git a/src/cli/export_command.rs b/src/cli/export_command.rs
index d488a97..78c436d 100644
--- a/src/cli/export_command.rs
+++ b/src/cli/export_command.rs
@@ -17,8 +17,10 @@
use std::{fs, io::Error as IoError, io::ErrorKind as IoErrorKind, path::PathBuf};
use clap::Args;
+use sha2::Digest;
use crate::{
+ utils,
vault::{BitWardenPasswords, Format, Vaults},
LprsCommand,
LprsError,
@@ -30,12 +32,17 @@ use crate::{
/// Export command, used to export the vaults in `lprs` format or `BitWarden`
/// format. The exported file will be a json file.
pub struct Export {
+ // TODO: `force` flag to write on existing file
/// The path to export to
- path: PathBuf,
+ path: PathBuf,
/// Format to export vaults in
#[arg(short, long, value_name = "FORMAT", default_value_t= Format::Lprs)]
- format: Format,
- // TODO: `force` flag to write on existing file
+ format: Format,
+ /// Encryption password of the exported vaults (in `lprs` format)
+ /// if there is not, will use the master password
+ #[arg(short = 'p', long)]
+ #[allow(clippy::option_option)]
+ encryption_password: Option