Fix examples and update CHANGELOG.md Signed-off-by: Cléo Rebert <cleo.rebert@gmail.com>
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
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5d9ce7b..4f6de61 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+# [5.5.0](https://github.com/constantoine/totp-rs/releases/tag/v5.5.0) (19/01/2024)
+### Changes
+- Documentation now indicates required feature.
+
+### Special thanks
+* [@AntonnMal](https://github.com/AntonnMal) for his work on #64.
+
# [5.4.0](https://github.com/constantoine/totp-rs/releases/tag/v5.4.0) (04/10/2023)
### Changes
- `SecretParseError` now implements `std::error::Error`.
diff --git a/Cargo.toml b/Cargo.toml
index fcf70b0..0892f38 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "totp-rs"
-version = "5.4.0"
+version = "5.5.0"
authors = ["Cleo Rebert <cleo.rebert@gmail.com>"]
rust-version = "1.61"
edition = "2021"
diff --git a/README.md b/README.md
index 527cf65..dcdfc06 100644
--- a/README.md
+++ b/README.md
@@ -214,6 +214,7 @@ Note: With `otpauth` feature, `TOTP.issuer` will be `None`, and `TOTP.account_na
```Rust
fn main() {
let totp = TOTP::default();
+ let code = totp.generate_current().unwrap();
println!("code: {}", code);
}
```
@@ -224,7 +225,7 @@ Add it to your `Cargo.toml`:
```toml
[dependencies.totp-rs]
version = "^5.3"
-features = ["qr"]
+features = ["steam"]
```
You can then do something like:
```Rust
@@ -234,7 +235,7 @@ fn main() {
let totp = TOTP::new_steam(
Secret::Encoded("KRSXG5CTMVRXEZLUKN2XAZLSKNSWG4TFOQ".to_string()).to_bytes().unwrap(),
).unwrap();
- let qr_code = totp.get_qr_base64()?;
- println!("{}", qr_code);
+ let code = totp.generate_current().unwrap();
+ println!("code: {}", code);
}
```
\ No newline at end of file