From 1704564b6117c0ef9a382abb4b2ca2ae81b56c2f Mon Sep 17 00:00:00 2001 From: EETagent Date: Fri, 28 Oct 2022 22:04:51 +0200 Subject: [PATCH] refactor: use native path type --- core/src/crypto.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/crypto.rs b/core/src/crypto.rs index 68a5e38..af34b08 100644 --- a/core/src/crypto.rs +++ b/core/src/crypto.rs @@ -6,6 +6,7 @@ use secrecy::ExposeSecret; use futures::io::{AsyncReadExt, AsyncWriteExt}; use rand::Rng; use std::iter; +use std::path::Path; use std::str::FromStr; /// Foolproof random 8 char string @@ -173,9 +174,9 @@ pub async fn decrypt_password_with_private_key( } // TODO: Massive refactor of encrypt_file_with_recipients required -pub async fn encrypt_file_with_recipients( - plain_file_path: &str, - cipher_file_path: &str, +pub async fn encrypt_file_with_recipients>( + plain_file_path: P, + cipher_file_path: P, recipients: Vec<&str>, ) -> Result<(), age::EncryptError> { let public_keys = recipients