Skip to content

Commit 0080f1d

Browse files
committed
Fix examples and update CHANGELOG.md
Signed-off-by: Cléo Rebert <cleo.rebert@gmail.com>
1 parent e68b083 commit 0080f1d

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [5.5.0](https://github.com/constantoine/totp-rs/releases/tag/v5.5.0) (19/01/2024)
2+
### Changes
3+
- Documentation now indicates required feature.
4+
5+
### Special thanks
6+
* [@AntonnMal](https://github.com/AntonnMal) for his work on #64.
7+
18
# [5.4.0](https://github.com/constantoine/totp-rs/releases/tag/v5.4.0) (04/10/2023)
29
### Changes
310
- `SecretParseError` now implements `std::error::Error`.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "totp-rs"
3-
version = "5.4.0"
3+
version = "5.5.0"
44
authors = ["Cleo Rebert <cleo.rebert@gmail.com>"]
55
rust-version = "1.61"
66
edition = "2021"

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ Note: With `otpauth` feature, `TOTP.issuer` will be `None`, and `TOTP.account_na
214214
```Rust
215215
fn main() {
216216
let totp = TOTP::default();
217+
let code = totp.generate_current().unwrap();
217218
println!("code: {}", code);
218219
}
219220
```
@@ -224,7 +225,7 @@ Add it to your `Cargo.toml`:
224225
```toml
225226
[dependencies.totp-rs]
226227
version = "^5.3"
227-
features = ["qr"]
228+
features = ["steam"]
228229
```
229230
You can then do something like:
230231
```Rust
@@ -234,7 +235,7 @@ fn main() {
234235
let totp = TOTP::new_steam(
235236
Secret::Encoded("KRSXG5CTMVRXEZLUKN2XAZLSKNSWG4TFOQ".to_string()).to_bytes().unwrap(),
236237
).unwrap();
237-
let qr_code = totp.get_qr_base64()?;
238-
println!("{}", qr_code);
238+
let code = totp.generate_current().unwrap();
239+
println!("code: {}", code);
239240
}
240241
```

0 commit comments

Comments
 (0)