diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ae5419..1e2780b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ # Changelog +## v0.6.1 +* Improved the documentation. No actual code changes. ## v0.6.0 * Using RustCrypto's SHA implementation by default, instead of Ring. * Improved the documentation. diff --git a/Cargo.toml b/Cargo.toml index 9b28d88..a9b6627 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "totp_rfc6238" -version = "0.6.0" +version = "0.6.1" authors = ["KaneGreen <737445366KG@Gmail.com>"] edition = "2021" license = "MIT OR Apache-2.0" diff --git a/README.md b/README.md index 4a3a699..73027bb 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,14 @@ A rust crate for generating TOTP codes (tokens) defined in [RFC 6238](https://to ## Features of this crate * Both low-level and high-level APIs are provided. * The length of the codes, the initial counter time (T0), update time interval -(period) and hash algorithm are configurable. -* HMAC algorithms are implemented by [ring](https://crates.io/crates/ring). + (period) and hash algorithm are configurable. +* HMAC algorithms are implemented by [RustCrypto](https://github.com/RustCrypto) or [ring](https://crates.io/crates/ring). * Read or write "[Key Uri Format](https://github.com/google/google-authenticator/wiki/Key-Uri-Format)" -(URIs start with `otpauth://totp/`) (the `oathuri` feature gate). + (URIs start with `otpauth://totp/`) (the `oathuri` feature gate). * Read or write `key` from base32-encoded string (the `oathuri` feature gate). ### Select SHA implementation -* using [RustCrypto](https://github.com/RustCrypto/MACs/tree/master/hmac)'s implementation (default) +* using [RustCrypto](https://github.com/RustCrypto/hashes)'s implementation (default) ```toml [dependencies] totp_rfc6238 = "0.6" @@ -38,7 +38,7 @@ fn main() { // 30 seconds, starting at "Jan 01 1970 00:00:00 UTC", using HMAC-SHA1. let mut totp_generator = TotpGenerator::new().build(); - // Assuming you read the key from some secure area + // Assuming you have read the key from somewhere secure let key = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890+/"; let output1 = totp_generator.get_code(key); @@ -70,6 +70,7 @@ fn main() { ## Changelog See [here](./CHANGELOG.md). + ### Incompatible API breaking changes The version number lower than `1.0.0` should be regarded as an unstable version of the API. Therefore, some version updates may contain incompatible API @@ -89,6 +90,7 @@ The codes of this crate has not been audited. ## Features that may be related to but NOT implemented in this crate * Read or write QR codes. +* HMAC-based One-Time Password (HOTP) algorithm as defined in RFC 4226. ## License This tool is primarily distributed under the terms of both the MIT license @@ -100,4 +102,4 @@ See [LICENSE-APACHE](LICENSE-APACHE), [LICENSE-MIT](LICENSE-MIT) for details. 1. Any contribution intentionally submitted for inclusion in totp_rfc6238 by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. -2. Pull requests are always welcome. \ No newline at end of file +2. Pull requests are always welcome. diff --git a/src/lib.rs b/src/lib.rs index 092506c..1a5214f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,7 +5,7 @@ //! * Both low-level and high-level APIs are provided. //! * The length of the codes, the initial counter time (T0), update time //! interval (period) and hash algorithm are configurable. -//! * HMAC algorithms are implemented by [ring](https://crates.io/crates/ring). +//! * HMAC algorithms are implemented by [RustCrypto](https://github.com/RustCrypto) or [ring](https://crates.io/crates/ring). //! * Read or write "[Key Uri Format](https://github.com/google/google-authenticator/wiki/Key-Uri-Format)" //! (URIs start with `otpauth://totp/`) (the `oathuri` feature gate). //! * Read or write `key` from base32-encoded string (the `oathuri` feature diff --git a/src/oath_uri.rs b/src/oath_uri.rs index d8ce37f..efd6aad 100644 --- a/src/oath_uri.rs +++ b/src/oath_uri.rs @@ -4,7 +4,7 @@ //! ```toml //! # Cargo.toml //! [dependencies] -//! totp_rfc6238 = { version = "0.4", features = [ "oathuri" ]} +//! totp_rfc6238 = { version = "0.6", features = [ "oathuri" ]} //! ``` //! //! The functions and methods in this module will automatically try to