diff options
-rw-r--r-- | Cargo.lock | 21 | ||||
-rw-r--r-- | Cargo.toml | 28 | ||||
-rw-r--r-- | wpa-psk-cli/CHANGELOG.md | 16 | ||||
-rw-r--r-- | wpa-psk-cli/Cargo.toml | 19 | ||||
-rw-r--r-- | wpa-psk-cli/LICENSE-APACHE-2.0 (renamed from LICENSE-APACHE-2.0) | 0 | ||||
-rw-r--r-- | wpa-psk-cli/LICENSE-MIT (renamed from LICENSE-MIT) | 0 | ||||
-rw-r--r-- | wpa-psk-cli/README.md (renamed from README.md) | 10 | ||||
-rw-r--r-- | wpa-psk-cli/src/bin/wpa-psk.rs (renamed from src/main.rs) | 0 | ||||
-rw-r--r-- | wpa-psk-cli/tests/cli.rs (renamed from tests/cli.rs) | 0 | ||||
-rw-r--r-- | wpa-psk/CHANGELOG.md | 70 | ||||
-rw-r--r-- | wpa-psk/Cargo.toml | 17 | ||||
-rw-r--r-- | wpa-psk/LICENSE-APACHE-2.0 | 12 | ||||
-rw-r--r-- | wpa-psk/LICENSE-MIT | 19 | ||||
-rw-r--r-- | wpa-psk/README.md | 22 | ||||
-rw-r--r-- | wpa-psk/src/lib.rs (renamed from src/lib.rs) | 0 |
15 files changed, 199 insertions, 35 deletions
@@ -194,9 +194,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" +checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" dependencies = [ "autocfg", "hashbrown", @@ -231,9 +231,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "os_str_bytes" -version = "6.0.1" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d8d0b2f198229de29dca79676f2738ff952edf3fde542eb8bf94d8c21b435" +checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" [[package]] name = "pbkdf2" @@ -434,11 +434,18 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "wpa-psk" -version = "0.1.5" +version = "0.2.0" dependencies = [ - "assert_cmd", - "clap", "hmac", "pbkdf2", "sha-1", ] + +[[package]] +name = "wpa-psk-cli" +version = "0.1.0" +dependencies = [ + "assert_cmd", + "clap", + "wpa-psk", +] @@ -1,23 +1,5 @@ -[package] -name = "wpa-psk" -version = "0.1.5" -authors = ["Stefan Kreutz <mail@skreutz.com>"] -edition = "2021" -description = "Compute the WPA-PSK of a Wi-FI SSID and passphrase" -readme = "README.md" -repository = "https://www.skreutz.com/scm/git/wpa-psk.git" -license = "MIT OR Apache-2.0" -keywords = ["wifi", "wpa", "password", "hash"] -categories = ["command-line-utilities", "algorithms"] -publish = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -pbkdf2 = { version = "0.11.0", default-features = false } -hmac = { version = "0.12.1", default-features = false } -sha-1 = { version = "0.10.0", default-features = false } -clap = { version = "3.1.18", features = ["derive"] } - -[dev-dependencies] -assert_cmd = "2.0.4" +[workspace] +members = [ + "wpa-psk", + "wpa-psk-cli", +] diff --git a/wpa-psk-cli/CHANGELOG.md b/wpa-psk-cli/CHANGELOG.md new file mode 100644 index 0000000..3ba3406 --- /dev/null +++ b/wpa-psk-cli/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep A Changelog][] and this project adheres to +[Semantic Versioning][]. + +[Keep A Changelog]: https://keepachangelog.com/en/1.0.0/ +[Semantic Versioning]: https://semver.org/spec/v2.0.0.html + +## Unreleased + +### Added + +- Added the existing command-line interface from crate `wpa-psk` version 0.1.5. +- Added this changelog. diff --git a/wpa-psk-cli/Cargo.toml b/wpa-psk-cli/Cargo.toml new file mode 100644 index 0000000..6561dde --- /dev/null +++ b/wpa-psk-cli/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "wpa-psk-cli" +version = "0.1.0" +authors = ["Stefan Kreutz <mail@skreutz.com>"] +edition = "2021" +description = "A command-line utility to compute the WPA-PSK of a Wi-FI SSID and passphrase" +readme = "README.md" +repository = "https://www.skreutz.com/scm/git/wpa-psk.git" +license = "MIT OR Apache-2.0" +keywords = ["wifi", "wpa", "password", "hash"] +categories = ["command-line-utilities"] +publish = true + +[dependencies] +clap = { version = "3.1.18", features = ["derive"] } +wpa-psk = { path = "../wpa-psk", version = "0.2.0" } + +[dev-dependencies] +assert_cmd = "2.0.4" diff --git a/LICENSE-APACHE-2.0 b/wpa-psk-cli/LICENSE-APACHE-2.0 index 7eefa9d..7eefa9d 100644 --- a/LICENSE-APACHE-2.0 +++ b/wpa-psk-cli/LICENSE-APACHE-2.0 diff --git a/LICENSE-MIT b/wpa-psk-cli/LICENSE-MIT index 4012e61..4012e61 100644 --- a/LICENSE-MIT +++ b/wpa-psk-cli/LICENSE-MIT diff --git a/README.md b/wpa-psk-cli/README.md index 0052d9c..6c00a4c 100644 --- a/README.md +++ b/wpa-psk-cli/README.md @@ -1,7 +1,7 @@ -# WPA-PSK +# wpa-psk-cli -This is a command-line utility and Rust library to compute the WPA pre-shared -key of a Wi-Fi SSID and passphrase. +This is a command-line utility to compute the WPA pre-shared key of a Wi-Fi +SSID and passphrase. See also the corresponding Rust library `wpa-psk`. ## Usage @@ -22,9 +22,9 @@ Hash *invalid* credentials: ## Installation -You can install `wpa-psk` using Cargo: +You can install the `wpa-psk` utility using Cargo: - $ cargo install wpa-psk + $ cargo install wpa-psk-cli ## License diff --git a/src/main.rs b/wpa-psk-cli/src/bin/wpa-psk.rs index 181585c..181585c 100644 --- a/src/main.rs +++ b/wpa-psk-cli/src/bin/wpa-psk.rs diff --git a/tests/cli.rs b/wpa-psk-cli/tests/cli.rs index 47fab8d..47fab8d 100644 --- a/tests/cli.rs +++ b/wpa-psk-cli/tests/cli.rs diff --git a/wpa-psk/CHANGELOG.md b/wpa-psk/CHANGELOG.md new file mode 100644 index 0000000..1d80d14 --- /dev/null +++ b/wpa-psk/CHANGELOG.md @@ -0,0 +1,70 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep A Changelog][] and this project adheres to +[Semantic Versioning][]. + +[Keep A Changelog]: https://keepachangelog.com/en/1.0.0/ +[Semantic Versioning]: https://semver.org/spec/v2.0.0.html + +## Unreleased + +### Added + +- Added this changelog. + +### Changed + +- Changed `TryFrom` implementations to return typed validation errors. +- Changed Git repository URL. + +### Removed + +- Extracted the command-line utility `wpa-psk` into a dedicated crate `wpa-psk-cli`. + +## [0.1.5] - 2022-05-23 + +### Added + +- Described command-line interface in [README.md](README.md). + +### Fixed + +- Fixed crate version in [Cargo.toml](Cargo.toml). + +## [0.1.4] - 2022-05-22 + +### Changed + +- Changed Git repository URL. +- Upgraded dependencies to their respective latest versions. + +## [0.1.3] - 2022-05-21 + +### Changed + +- Updated dependencies. +- Changed Git repository URL. + +### Fixed + +- Replaced deprecated function call `clap::IntoApp::into_app`. + +## [0.1.2] - 2022-03-30 + +### Changed + +- Relaxed pbkdf2 version to include 0.11. + +## [0.1.1] - 2022-02-01 + +### Changed + +- Updated dependencies. + +## [0.1.0] - 2022-01-03 + +### Added + +- Add initial implementation. diff --git a/wpa-psk/Cargo.toml b/wpa-psk/Cargo.toml new file mode 100644 index 0000000..ca173f4 --- /dev/null +++ b/wpa-psk/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "wpa-psk" +version = "0.2.0" +authors = ["Stefan Kreutz <mail@skreutz.com>"] +edition = "2021" +description = "Compute the WPA-PSK of a Wi-FI SSID and passphrase" +readme = "README.md" +repository = "https://www.skreutz.com/scm/git/wpa-psk.git" +license = "MIT OR Apache-2.0" +keywords = ["wifi", "wpa", "password", "hash"] +categories = ["algorithms"] +publish = true + +[dependencies] +pbkdf2 = { version = "0.11.0", default-features = false } +hmac = { version = "0.12.1", default-features = false } +sha-1 = { version = "0.10.0", default-features = false } diff --git a/wpa-psk/LICENSE-APACHE-2.0 b/wpa-psk/LICENSE-APACHE-2.0 new file mode 100644 index 0000000..7eefa9d --- /dev/null +++ b/wpa-psk/LICENSE-APACHE-2.0 @@ -0,0 +1,12 @@ +Copyright 2021 Stefan Kreutz <mail@skreutz.com> + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. diff --git a/wpa-psk/LICENSE-MIT b/wpa-psk/LICENSE-MIT new file mode 100644 index 0000000..4012e61 --- /dev/null +++ b/wpa-psk/LICENSE-MIT @@ -0,0 +1,19 @@ +Copyright 2021 Stefan Kreutz <mail@skreutz.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/wpa-psk/README.md b/wpa-psk/README.md new file mode 100644 index 0000000..c2e7136 --- /dev/null +++ b/wpa-psk/README.md @@ -0,0 +1,22 @@ +# wpa-psk + +This is a Rust library to compute the WPA pre-shared key of a Wi-Fi SSID and +passphrase. See also the corresponding command-line interface `wpa-psk-cli`. + +See the [crate documentation][docs] more information. + +[docs]: https://docs.rs/wpa-psk/latest/wpa_psk/ + +## License + +This work is distributed under the terms of both, the [MIT License][MIT] and +the [Apache License, Version 2.0][Apache-2.0]. + +[MIT]: LICENSE-MIT +[Apache-2.0]: LICENSE-APACHE-2.0 + +## Contribution + +Contributions are welcome! Please [contact][] me via email. + +[contact]: https://www.skreutz.com/contact/ diff --git a/src/lib.rs b/wpa-psk/src/lib.rs index e99418c..e99418c 100644 --- a/src/lib.rs +++ b/wpa-psk/src/lib.rs |