Compare commits

...

2 Commits

  1. 4
      CHANGELOG.md
  2. 8
      Cargo.toml
  3. 4
      src/enums.rs

@ -1,3 +1,7 @@
# 0.3.1
- Update deps
# 0.3.0
- Added lifetime parameter to `HttpMethod`

@ -1,6 +1,6 @@
[package]
name = "digest_auth"
version = "0.3.0"
version = "0.3.1"
authors = ["Ondřej Hruška <ondra@ondrovo.com>"]
edition = "2018"
description = "Implementation of the Digest Auth algorithm as defined in IETF RFC 2069, 2617, and 7616, intended for HTTP clients"
@ -17,9 +17,9 @@ license = "MIT"
[dependencies]
rand = "0.8"
hex = "0.4"
sha2 = "0.9"
md-5 = "0.9"
digest = "0.9"
sha2 = "0.10"
md-5 = "0.10"
digest = "0.10"
[dependencies.http]
version = "0.2.4"

@ -7,7 +7,7 @@ use std::str::FromStr;
use digest::{Digest, DynDigest};
use md5::Md5;
use sha2::{Sha256, Sha512Trunc256};
use sha2::{Sha256, Sha512_256};
use std::borrow::Cow;
/// Algorithm type
@ -37,7 +37,7 @@ impl Algorithm {
let mut hash: Box<dyn DynDigest> = match self.algo {
AlgorithmType::MD5 => Box::new(Md5::new()),
AlgorithmType::SHA2_256 => Box::new(Sha256::new()),
AlgorithmType::SHA2_512_256 => Box::new(Sha512Trunc256::new()),
AlgorithmType::SHA2_512_256 => Box::new(Sha512_256::new()),
};
hash.update(bytes);

Loading…
Cancel
Save