mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-20 04:48:32 +00:00
refactor: remove portfolio file after encrypting
This commit is contained in:
parent
dd456a7870
commit
205996cc2e
1 changed files with 4 additions and 3 deletions
|
|
@ -394,13 +394,14 @@ impl PortfolioService {
|
|||
&private_key
|
||||
).await?;
|
||||
|
||||
tokio::fs::remove_file(path.to_owned()).await?;
|
||||
|
||||
|
||||
let enc_portfolio= crypto::encrypt_buffer_with_recipients(
|
||||
&plain_portfolio,
|
||||
recipients
|
||||
).await?;
|
||||
|
||||
|
||||
tokio::fs::remove_file(path.to_owned()).await?;
|
||||
|
||||
tokio::fs::write(path, enc_portfolio).await?;
|
||||
|
||||
info!("PORTFOLIO {} REENCRYPT FINISHED", candidate_id);
|
||||
|
|
|
|||
Loading…
Reference in a new issue