diff --git a/Cargo.lock b/Cargo.lock index 7a799a4..ceb2eb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,15 +2,15 @@ name = "secretshare" version = "0.1.3" dependencies = [ - "crc24 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crc24 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crc24" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -33,7 +33,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "rand" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -42,6 +42,6 @@ dependencies = [ [[package]] name = "rustc-serialize" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/Cargo.toml b/Cargo.toml index 590fce2..062673a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "secretshare" -version = "0.1.3" +version = "0.1.4" authors = ["Sebastian Gesemann "] description = "This is an implementation of Shamir's secret sharing scheme." license = "GPLv3" diff --git a/src/gf256.rs b/src/gf256.rs index 8d7b86c..fd6b060 100644 --- a/src/gf256.rs +++ b/src/gf256.rs @@ -39,13 +39,13 @@ fn get_tables() -> &'static Tables { // mutable access is fine because of synchronization via INIT let tabs = unsafe { &mut TABLES }; let mut tmp = 1; - for power in 0..255us { + for power in 0..255usize { tabs.exp[power] = tmp; tabs.log[tmp as usize] = power as u8; tmp = xtimes(tmp); } tabs.exp[255] = 1; - for x in 1..256us { + for x in 1..256usize { let l = tabs.log[x]; let nl = if l==0 { 0 } else { 255 - l }; let i = tabs.exp[nl as usize]; diff --git a/src/main.rs b/src/main.rs index 463f871..5a58b58 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ #![feature(collections)] #![feature(core)] -#![feature(io)] +#![feature(old_io)] #![feature(env)] #![feature(hash)] @@ -149,7 +149,7 @@ fn read_no_more_than(r: &mut R, max: usize) -> IoResult> { /// computes a CRC-24 hash over the concatenated coding parameters k, n /// and the raw share data fn crc24_as_bytes(k: u8, n: u8, octets: &[u8]) -> [u8; 3] { - use std::hash::{ Hasher, Writer }; + use std::hash::Hasher; use std::slice::ref_slice; let mut h = crc24::Crc24Hasher::new();