This commit is contained in:
MedzikUser 2022-06-18 11:28:34 +02:00
parent 7ef23c602a
commit 9c2fb0c8e9
No known key found for this signature in database
GPG Key ID: A5FAC1E185C112DB
2 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.2.1] - 2022-06-18
### Added
- Examples
- [Examples](https://github.com/MedzikUser/rust-crypto-utils/tree/v0.2.1/examples)
### Changed
- update rust crate jsonwebtoken to 8.1.1

View File

@ -1,4 +1,4 @@
use crypto_utils::sha::{CryptographicHash, Algorithm};
use crypto_utils::sha::{Algorithm, CryptographicHash};
fn main() {
let input = "This is a input text to be hashed";
@ -11,9 +11,9 @@ fn main() {
let sha256 = CryptographicHash::hash(Algorithm::SHA256, input.as_bytes());
println!("sha256 = `{}`", hex::encode(sha256));
println!("sha256 = `{}`", hex::encode(sha256));
let sha512 = CryptographicHash::hash(Algorithm::SHA512, input.as_bytes());
println!("sha512 = `{}`", hex::encode(sha512));
println!("sha512 = `{}`", hex::encode(sha512));
}