From 56175287f90bd455c1b67d88385884e83d589b76 Mon Sep 17 00:00:00 2001 From: MedzikUser Date: Fri, 16 Sep 2022 10:54:22 +0200 Subject: [PATCH] chore(release): v0.4.1 --- .github/workflows/rust.yml | 2 +- CHANGELOG.md | 41 -------------------------------------- Cargo.lock | 2 +- Cargo.toml | 6 +++--- README.md | 24 +++------------------- src/lib.rs | 2 +- 6 files changed, 9 insertions(+), 68 deletions(-) delete mode 100644 CHANGELOG.md diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f5220e4..39ecfab 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,7 +13,7 @@ env: CARGO_TERM_COLOR: always jobs: - build: + rust: strategy: fail-fast: false matrix: diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 0936d50..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,41 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/) -and this project adheres to [Semantic Versioning](http://semver.org/). - - - -## [Unreleased] - -## [0.4.0] - 2022-06-29 -### Features -- **sha**: Added HMAC Sha1, HMAC Sha256 and HMAC Sha512 - -## [0.3.0] - 2022-06-23 -- updated dependencies -### Features -- **jwt**: pub use type `TokenData` - -## [0.2.1] - 2022-06-18 -### Added -- [Examples](https://github.com/MedzikUser/rust-crypto-utils/tree/v0.2.1/examples) -### Changed -- update rust crate jsonwebtoken to 8.1.1 - -## [0.2.0] - 2022-06-11 -### Added -- Json Web Token - -## [0.1.0] - 2022-06-11 -### Added -- Sha1, Sha256, Sha512 hasher - - -[Unreleased]: https://github.com/MedzikUser/rust-crypto-utils/compare/v0.4.0...HEAD -[0.4.0]: https://github.com/MedzikUser/rust-crypto-utils/commits/v0.4.0 -[0.3.0]: https://github.com/MedzikUser/rust-crypto-utils/commits/v0.3.0 -[0.2.1]: https://github.com/MedzikUser/rust-crypto-utils/commits/v0.2.1 -[0.2.0]: https://github.com/MedzikUser/rust-crypto-utils/commits/v0.2.0 -[0.1.0]: https://github.com/MedzikUser/rust-crypto-utils/commits/v0.1.0 diff --git a/Cargo.lock b/Cargo.lock index 3539422..432e842 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -98,7 +98,7 @@ dependencies = [ [[package]] name = "crypto-utils" -version = "0.4.0" +version = "0.4.1" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 88ca4c3..e33affa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "crypto-utils" -version = "0.4.0" +version = "0.4.1" description = "Cryptography Utils for Rust" -authors = ["MedzikUser "] +authors = ["MedzikUser "] license = "MIT" keywords = ["crypto", "sha"] categories = ["cryptography"] @@ -27,4 +27,4 @@ thiserror = "1.0.35" [dev-dependencies] anyhow = "1.0.65" -hex = { version = "0.4.3" } +hex = "0.4.3" diff --git a/README.md b/README.md index f273b5d..135da63 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# crypto-utils +# Cryptography Utils for Rust [![github]](https://github.com/MedzikUser/rust-crypto-utils) [![crates-io]](https://crates.io/crates/crypto-utils) @@ -13,25 +13,18 @@ Cryptography Utils for Rust ### Importing -The driver is available on [crates-io](https://crates.io/crates/crypto-utils). To use the driver in +The driver is available on [crates.io](https://crates.io/crates/crypto-utils). To use the driver in your application, simply add it to your project's `Cargo.toml`. ```toml [dependencies] -crypto-utils = "0.4.0" +crypto-utils = "0.4.1" ``` ### How to use? #### Compute a Sha hash -Add `sha` features (is enabled by default) - -```toml -[dependencies] -crypto-utils = { version = "...", features = ["sha"] } -``` - Quick and easy Sha1, Sha256 and Sha512 hash computing. ```rust @@ -51,13 +44,6 @@ assert_eq!(hash, "21bd12dc183f740ee76f27b78eb39c8ad972a757".to_string()) #### Json Web Token -Add `jwt` features (is enabled by default) - -```toml -[dependencies] -crypto-utils = { version = "...", features = ["jwt"] } -``` - Create and decode a token ```rust @@ -66,13 +52,9 @@ use crypto_utils::jsonwebtoken::{Claims, Token}; let secret = b"secret"; let user_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; -// create claims let claims = Claims::new(user_id, 24); - -// create token let token = Token::new(secret, claims).unwrap(); -// decode token let decoded = Token::decode(secret, token.encoded).unwrap(); ``` diff --git a/src/lib.rs b/src/lib.rs index ed3eaf5..0d48a4c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,7 +21,7 @@ //! //! ## How to use? //! -//! Check [jsonwebtoken] and [sha] module +//! Check [jsonwebtoken] and [sha] modules. //! //! ## All Feature flags //!