cotp 1.9.9

Trustworthy, encrypted, command-line TOTP/HOTP authenticator app with import functionality.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::otp::otp_element::{OTPDatabase, OTPElement};

type AndOtpDatabase = Vec<OTPElement>;
impl From<OTPDatabase> for AndOtpDatabase {
    fn from(value: OTPDatabase) -> Self {
        value.elements
    }
}

impl<'a> From<&'a OTPDatabase> for &'a AndOtpDatabase {
    fn from(value: &'a OTPDatabase) -> Self {
        &value.elements
    }
}