mirror of
https://github.com/mii443/RustySecrets.git
synced 2025-08-22 16:25:32 +00:00
keep up with Rust
This commit is contained in:
12
Cargo.lock
generated
12
Cargo.lock
generated
@ -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"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "secretshare"
|
||||
version = "0.1.3"
|
||||
version = "0.1.4"
|
||||
authors = ["Sebastian Gesemann <s.gesemann@gmail.com>"]
|
||||
description = "This is an implementation of Shamir's secret sharing scheme."
|
||||
license = "GPLv3"
|
||||
|
@ -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];
|
||||
|
@ -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: Reader>(r: &mut R, max: usize) -> IoResult<Vec<u8>> {
|
||||
/// 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();
|
||||
|
Reference in New Issue
Block a user