Merge pull request #201 from tarcieri/digest-0-8

Update to digest 0.8 and sha2 0.8
This commit is contained in:
Henry de Valence 2018-11-02 12:03:47 -07:00 committed by GitHub
commit 2e8f3c8f41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 26 deletions

View file

@ -26,7 +26,7 @@ features = ["nightly"]
travis-ci = { repository = "dalek-cryptography/curve25519-dalek", branch = "master"} travis-ci = { repository = "dalek-cryptography/curve25519-dalek", branch = "master"}
[dev-dependencies] [dev-dependencies]
sha2 = "0.7" sha2 = { version = "0.8", default-features = false }
bincode = "1" bincode = "1"
criterion = "0.2" criterion = "0.2"
@ -43,8 +43,7 @@ harness = false
[dependencies] [dependencies]
rand = { version = "0.5", default-features = false } rand = { version = "0.5", default-features = false }
byteorder = { version = "^1.2.3", default-features = false, features = ["i128"] } byteorder = { version = "^1.2.3", default-features = false, features = ["i128"] }
digest = "0.7" digest = { version = "0.8", default-features = false }
generic-array = "0.9"
clear_on_drop = "=0.2.3" clear_on_drop = "=0.2.3"
subtle = { version = "1", default-features = false } subtle = { version = "1", default-features = false }
serde = { version = "1.0", optional = true } serde = { version = "1.0", optional = true }
@ -53,8 +52,7 @@ packed_simd = { version = "0.3.0", features = ["into_bits"], optional = true }
[build-dependencies] [build-dependencies]
rand = { version = "0.5", default-features = false } rand = { version = "0.5", default-features = false }
byteorder = { version = "^1.2.3", default-features = false, features = ["i128"] } byteorder = { version = "^1.2.3", default-features = false, features = ["i128"] }
digest = "0.7" digest = { version = "0.8", default-features = false }
generic-array = "0.9"
clear_on_drop = "=0.2.3" clear_on_drop = "=0.2.3"
subtle = { version = "1", default-features = false } subtle = { version = "1", default-features = false }
serde = { version = "1.0", optional = true } serde = { version = "1.0", optional = true }

View file

@ -10,7 +10,6 @@ extern crate byteorder;
extern crate clear_on_drop; extern crate clear_on_drop;
extern crate core; extern crate core;
extern crate digest; extern crate digest;
extern crate generic_array;
extern crate rand; extern crate rand;
extern crate subtle; extern crate subtle;

View file

@ -44,12 +44,7 @@ extern crate packed_simd;
extern crate rand; extern crate rand;
extern crate clear_on_drop; extern crate clear_on_drop;
extern crate byteorder; extern crate byteorder;
pub extern crate digest;
// The `Digest` trait is implemented using `generic_array`, so we need it
// too. Hopefully we can eliminate `generic_array` from `Digest` once const
// generics land.
extern crate digest;
extern crate generic_array;
// Used for traits related to constant-time code. // Used for traits related to constant-time code.
extern crate subtle; extern crate subtle;

View file

@ -167,7 +167,7 @@ use core::borrow::Borrow;
use rand::{Rng, CryptoRng}; use rand::{Rng, CryptoRng};
use digest::Digest; use digest::Digest;
use generic_array::typenum::U64; use digest::generic_array::typenum::U64;
use constants; use constants;
use field::FieldElement; use field::FieldElement;

View file

@ -154,7 +154,7 @@ use prelude::*;
use rand::{Rng, CryptoRng}; use rand::{Rng, CryptoRng};
use digest::Digest; use digest::Digest;
use generic_array::typenum::U64; use digest::generic_array::typenum::U64;
use subtle::Choice; use subtle::Choice;
use subtle::ConditionallyAssignable; use subtle::ConditionallyAssignable;
@ -579,14 +579,13 @@ impl Scalar {
/// use sha2::Sha512; /// use sha2::Sha512;
/// ///
/// # fn main() { /// # fn main() {
/// let mut h = Sha512::default(); /// let mut h = Sha512::new()
/// /// .chain("To really appreciate architecture, you may even need to commit a murder.")
/// h.input(b"To really appreciate architecture, you may even need to commit a murder."); /// .chain("While the programs used for The Manhattan Transcripts are of the most extreme")
/// h.input(b"While the programs used for The Manhattan Transcripts are of the most extreme"); /// .chain("nature, they also parallel the most common formula plot: the archetype of")
/// h.input(b"nature, they also parallel the most common formula plot: the archetype of"); /// .chain("murder. Other phantasms were occasionally used to underline the fact that")
/// h.input(b"murder. Other phantasms were occasionally used to underline the fact that"); /// .chain("perhaps all architecture, rather than being about functional standards, is")
/// h.input(b"perhaps all architecture, rather than being about functional standards, is"); /// .chain("about love and death.");
/// h.input(b"about love and death.");
/// ///
/// let s = Scalar::from_hash(h); /// let s = Scalar::from_hash(h);
/// ///