bitwarden_uniffi/vault/
password_history.rsuse std::sync::Arc;
use bitwarden_vault::{PasswordHistory, PasswordHistoryView, VaultClientExt};
use crate::{Client, Result};
#[derive(uniffi::Object)]
pub struct ClientPasswordHistory(pub Arc<Client>);
#[uniffi::export]
impl ClientPasswordHistory {
pub fn encrypt(&self, password_history: PasswordHistoryView) -> Result<PasswordHistory> {
Ok(self
.0
.0
.vault()
.password_history()
.encrypt(password_history)?)
}
pub fn decrypt_list(&self, list: Vec<PasswordHistory>) -> Result<Vec<PasswordHistoryView>> {
Ok(self.0 .0.vault().password_history().decrypt_list(list)?)
}
}