Commit 7876ca57c773d6b27abc97b12ba63792d9271b48

Cleo Rebert 2020-04-13T17:59:04

exported fields to export documentation

diff --git a/Cargo.toml b/Cargo.toml
index 3de3583..c22368c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "totp-rs"
-version = "0.2.0"
+version = "0.2.1"
 authors = ["Cleo Rebert <cleo.rebert@gmail.com>"]
 edition = "2018"
 readme = "README.md"
diff --git a/src/lib.rs b/src/lib.rs
index 8b66e3f..3b78628 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -21,15 +21,15 @@ pub enum Algorithm {
 #[derive(Debug)]
 pub struct TOTP {
     /// SHA-1 is the most widespread algorithm used, and for totp pursposes, SHA-1 hash collisions are [not a problem](https://tools.ietf.org/html/rfc4226#appendix-B.2) as HMAC-SHA-1 is not impacted. It's also the main one cited in [rfc-6238](https://tools.ietf.org/html/rfc6238#section-3) even though the [reference implementation](https://tools.ietf.org/html/rfc6238#appendix-A) permits the use of SHA-1, SHA-256 and SHA-512. Not all clients support other algorithms then SHA-1
-    algorithm: Algorithm,
+    pub algorithm: Algorithm,
     /// The number of digits composing the auth code. Per [rfc-4226](https://tools.ietf.org/html/rfc4226#section-5.3), this can oscilate between 6 and 8 digits
-    digits: usize,
+    pub digits: usize,
     /// Number of steps allowed as network delay. 1 would mean one step before current step and one step after are valids. The recommended value per [rfc-6238](https://tools.ietf.org/html/rfc6238#section-5.2) is 1. Anything more is sketchy, and anyone recommending more is, by definition, ugly and stuTOTPpid
-    skew: u8,
+    pub skew: u8,
     /// Duration in seconds of a step. The recommended value per [rfc-6238](https://tools.ietf.org/html/rfc6238#section-5.2) is 30 seconds
-    step: u64,
+    pub step: u64,
     /// As per [rfc-4226](https://tools.ietf.org/html/rfc4226#section-4) the secret should come from a strong source, most likely a CSPRNG. It should be at least 128 bits, but 160 are recommended
-    secret: Vec<u8>,
+    pub secret: Vec<u8>,
 }
 
 impl TOTP {