Skip to content

Commit

Permalink
Replace byte-tools with byteorder crate as byte-tools no longer offer…
Browse files Browse the repository at this point in the history
…s the rquired functionality
  • Loading branch information
brycx committed Aug 22, 2018
1 parent 3a69e4b commit e8602a1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exclude = [
rand = "0.5.5"
sha2 = "0.7.1"
tiny-keccak = "1.4.2"
byte-tools = "0.2.0"
byteorder = "1.2.4"
subtle = "0.7.0"
seckey = "0.9.1"

Expand Down
4 changes: 2 additions & 2 deletions src/hazardous/cshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
//!
//! hash.finalize(&mut out).unwrap();
//! ```
use byte_tools::write_u64_be;
use byteorder::{ByteOrder, BigEndian};
use core::mem;
use tiny_keccak::Keccak;
use utilities::errors::*;
Expand Down Expand Up @@ -173,7 +173,7 @@ fn left_encode(x: u64) -> ([u8; 9], usize) {
if x == 0 {
offset = 8;
} else {
write_u64_be(&mut input[1..], x.to_le());
BigEndian::write_u64(&mut input[1..], x.to_le());
for idx in &input {
if *idx != 0 {
break;
Expand Down
4 changes: 2 additions & 2 deletions src/hazardous/pbkdf2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
//! assert!(pbkdf2::verify(&exp_dk, "Secret password".as_bytes(), &salt, 10000, &mut dk_out).unwrap());
//! ```
use byte_tools::write_u32_be;
use byteorder::{ByteOrder, BigEndian};
use hazardous::constants::{HLenArray, HLEN};
use hazardous::hmac;
use utilities::{errors::*, util};
Expand All @@ -81,7 +81,7 @@ fn function_f(

let mut u_step: HLenArray = [0u8; 64];
// First 4 bytes used for index BE conversion
write_u32_be(&mut u_step[..4], index as u32);
BigEndian::write_u32(&mut u_step[..4], index as u32);
hmac.update(salt);
hmac.update(&u_step[..4]);

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#![no_std]
#![forbid(warnings, unsafe_code)]

extern crate byte_tools;
extern crate byteorder;
extern crate rand;
extern crate seckey;
extern crate sha2;
Expand Down

0 comments on commit e8602a1

Please sign in to comment.