From 8350ac6afb2d678b74581000a6aafe1994b72231 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Wed, 16 Jan 2019 17:26:30 -0800 Subject: Update nitrokey crate to 0.3.3 This change updates the nitrokey crate to version 0.3.3. Along with that change we update rand to 0.6.4 because rand 0.6.1 does not yet contain a publicly accessible rand_os. Note that we no longer require all crates in rand's workspace, but only rand_os and rand_core, which is a significant reduction in the number of lines of code compiled. Import subrepo nitrokey/:nitrokey at 7cf747d56ddc0b7eeedc3caf36dcc909907a171c Import subrepo rand/:rand at 4336232dda03323634b10ec72ddf27914aebc3a2 --- rand/rand_chacha/src/chacha.rs | 6 +++--- rand/rand_chacha/src/lib.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'rand/rand_chacha/src') diff --git a/rand/rand_chacha/src/chacha.rs b/rand/rand_chacha/src/chacha.rs index 3e90409..86f191e 100644 --- a/rand/rand_chacha/src/chacha.rs +++ b/rand/rand_chacha/src/chacha.rs @@ -114,7 +114,7 @@ impl ChaChaRng { /// byte-offset. /// /// Note: this function is currently only available with Rust 1.26 or later. - #[cfg(rust_1_26)] + #[cfg(all(rustc_1_26, not(target_os = "emscripten")))] pub fn get_word_pos(&self) -> u128 { let mut c = (self.0.core.state[13] as u64) << 32 | (self.0.core.state[12] as u64); @@ -135,7 +135,7 @@ impl ChaChaRng { /// 60 bits. /// /// Note: this function is currently only available with Rust 1.26 or later. - #[cfg(rust_1_26)] + #[cfg(all(rustc_1_26, not(target_os = "emscripten")))] pub fn set_word_pos(&mut self, word_offset: u128) { let index = (word_offset as usize) & 0xF; let counter = (word_offset >> 4) as u64; @@ -330,7 +330,7 @@ mod test { } #[test] - #[cfg(rust_1_26)] + #[cfg(all(rustc_1_26, not(target_os = "emscripten")))] fn test_chacha_true_values_c() { // Test vector 4 from // https://tools.ietf.org/html/draft-nir-cfrg-chacha20-poly1305-04 diff --git a/rand/rand_chacha/src/lib.rs b/rand/rand_chacha/src/lib.rs index 8cff03a..74ad466 100644 --- a/rand/rand_chacha/src/lib.rs +++ b/rand/rand_chacha/src/lib.rs @@ -18,7 +18,7 @@ #![no_std] -extern crate rand_core; +pub extern crate rand_core; mod chacha; -- cgit v1.2.3