Skip to content

Commit

Permalink
upgrade dependency close #14
Browse files Browse the repository at this point in the history
  • Loading branch information
realityone committed Jan 19, 2022
1 parent 1beaa12 commit 2786ed9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
17 changes: 9 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ name = "libnetkeeper"
version = "0.2.1"

[dependencies]
aes_frast = "0.1.2"
byteorder = "1.1.0"
chrono = "0.4.0"
linked-hash-map = "0.3.0"
md4 = "0.4.1"
md5 = "0.4.0"
rand = "0.3.15"
sha1 = "0.6.0"
aes_frast = "0.1.5"
byteorder = "1.4.3"
chrono = "0.4.19"
digest = "0.10.1"
linked-hash-map = "0.5.4"
md4 = "0.10.0"
md5 = "0.7.0"
rand = "0.8.4"
sha1 = "0.10.0"

[features]
default = [
Expand Down
8 changes: 4 additions & 4 deletions src/crypto/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ impl MD4 {

impl Hasher for MD4 {
fn update(&mut self, bytes: &[u8]) {
self.0.input(bytes)
self.0.update(bytes);
}

fn finish(&mut self) -> Vec<u8> {
self.0.result().to_vec()
self.0.clone().finalize().to_vec()
}
}

Expand All @@ -51,7 +51,7 @@ impl Hasher for MD5 {
}

fn finish(&mut self) -> Vec<u8> {
self.0.compute().to_vec()
self.0.clone().compute().to_vec()
}
}

Expand All @@ -67,7 +67,7 @@ impl Hasher for SHA1 {
}

fn finish(&mut self) -> Vec<u8> {
self.0.digest().bytes().to_vec()
self.0.clone().finalize().to_vec()
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/drcom/wired/dialer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl ChallengeRequest {
pub fn new(sequence: Option<u16>) -> Self {
ChallengeRequest {
sequence: sequence.unwrap_or_else(|| {
current_timestamp() as u16 + rand::thread_rng().gen_range(0xF, 0xFF)
current_timestamp() as u16 + rand::thread_rng().gen_range(0xF..0xFF)
}),
}
}
Expand Down

0 comments on commit 2786ed9

Please sign in to comment.