pub enum Format {
OtpauthList,
Aegis,
TwoFas,
AndOtp,
Bitwarden,
GoogleMigration,
}Expand description
An export format this module can read, write, or both.
Variants§
OtpauthList
One otpauth:// URI per line. What Ente Auth’s plain-text export is,
and what KeePassXC, Raivo, Proton Pass and most others accept back.
Aegis
Aegis Authenticator’s unencrypted JSON vault.
TwoFas
2FAS Auth’s unencrypted JSON backup.
AndOtp
andOTP’s unencrypted JSON export (also read by FreeOTP+).
Bitwarden
A Bitwarden JSON export — reads login.totp off each item.
GoogleMigration
Google Authenticator’s otpauth-migration://offline?data=… QR payload.
Implementations§
Source§impl Format
impl Format
Sourcepub const EXPORTABLE: [Format; 3]
pub const EXPORTABLE: [Format; 3]
The formats --format accepts on export.
Read-only formats are absent on purpose. Bitwarden’s export is a whole password vault and writing one containing nothing but TOTP seeds would produce a file that imports as a set of empty logins; Google’s migration payload is a QR code this app cannot draw (see Phase 19’s decision about the CSP), so writing the URI behind it would be a format nothing reads.
Sourcepub fn parse(raw: &str) -> Option<Self>
pub fn parse(raw: &str) -> Option<Self>
Parses a --format value.
ente is an alias for otpauth, not a format of its own: Ente Auth’s
plain export is a list of otpauth:// URIs, and its import accepts the
same. The alias exists because somebody with an Ente export will type
--format ente, and being told “unknown format” when the thing works is
a bad answer.
Sourcepub fn is_exportable(self) -> bool
pub fn is_exportable(self) -> bool
Whether build can write this format.