bitwarden_vault/
client_totp.rsuse chrono::{DateTime, Utc};
use crate::{
generate_totp, generate_totp_cipher_view, CipherListView, ClientVault, TotpError, TotpResponse,
};
impl<'a> ClientVault<'a> {
pub fn generate_totp(
&'a self,
key: String,
time: Option<DateTime<Utc>>,
) -> Result<TotpResponse, TotpError> {
generate_totp(key, time)
}
pub fn generate_totp_cipher_view(
&'a self,
view: CipherListView,
time: Option<DateTime<Utc>>,
) -> Result<TotpResponse, TotpError> {
let enc = self.client.internal.get_encryption_settings()?;
generate_totp_cipher_view(&enc, view, time)
}
}