1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#![deny(missing_docs, missing_debug_implementations)]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(
not(any(
feature = "std",
feature = "alloc",
feature = "only-gauth",
feature = "cstr",
feature = "base32",
feature = "serde",
feature = "abomonation_impl",
)),
doc = "No features were enabled in this documentation build."
)]
#![cfg_attr(
any(
feature = "std",
feature = "alloc",
feature = "only-gauth",
feature = "cstr",
feature = "base32",
feature = "serde",
feature = "abomonation_impl"
),
doc = "Enabled in this documentation build:\n"
)]
#![cfg_attr(feature = "std", doc = "- `std`")]
#![cfg_attr(feature = "alloc", doc = "- `alloc`")]
#![cfg_attr(
feature = "only-gauth",
doc = "- `only-gauth` (disables `Algorithm` type)"
)]
#![cfg_attr(feature = "cstr", doc = "- `cstr`")]
#![cfg_attr(feature = "base32", doc = "- `base32`")]
#![cfg_attr(feature = "serde", doc = "- `serde`")]
#![cfg_attr(feature = "abomonation_impl", doc = "- `abomonation_impl`")]
#[cfg(feature = "abomonation_derive")]
extern crate abomonation_derive;
#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(all(feature = "base32", any(feature = "std", feature = "alloc")))]
#[cfg_attr(
docsrs,
doc(cfg(all(feature = "base32", any(feature = "std", feature = "alloc"))))
)]
pub(crate) const B32A: base32::Alphabet =
base32::Alphabet::RFC4648 { padding: false };
#[cfg(not(feature = "only-gauth"))]
#[cfg_attr(docsrs, doc(cfg(not(feature = "only-gauth"))))]
pub(crate) mod alg;
#[cfg(not(feature = "only-gauth"))]
#[cfg_attr(docsrs, doc(cfg(not(feature = "only-gauth"))))]
pub use alg::*;
mod array;
pub use array::Array;
mod hotp;
pub use hotp::HOTP;
mod totp;
pub use totp::TOTP;
#[cfg_attr(docsrs, doc(cfg(all(feature = "std", feature = "only-gauth"))))]
#[cfg(feature = "std")]
pub mod simple;
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(all(feature = "std", feature = "only-gauth"))))]
pub use simple::{
read_hotp_gauth as hotp,
read_totp_gauth as totp,
};
#[cfg(all(feature = "base32", any(feature = "alloc", feature = "std")))]
mod err;
#[cfg(all(feature = "base32", any(feature = "alloc", feature = "std")))]
#[cfg_attr(
docsrs,
doc(cfg(all(feature = "base32", any(feature = "alloc", feature = "std"))))
)]
pub use err::Error;
#[cfg(all(feature = "base32", any(feature = "alloc", feature = "std")))]
mod segs;
#[cfg(all(feature = "base32", any(feature = "alloc", feature = "std")))]
#[cfg_attr(
docsrs,
doc(cfg(all(feature = "base32", any(feature = "alloc", feature = "std"))))
)]
pub use segs::Segs;