mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
Update sha2, digest to 0.9
This commit is contained in:
parent
c4824e1384
commit
6afd8ff212
3 changed files with 8 additions and 8 deletions
|
|
@ -30,7 +30,7 @@ features = ["nightly", "simd_backend"]
|
|||
travis-ci = { repository = "dalek-cryptography/curve25519-dalek", branch = "master"}
|
||||
|
||||
[dev-dependencies]
|
||||
sha2 = { version = "0.8", default-features = false }
|
||||
sha2 = { version = "0.9", default-features = false }
|
||||
bincode = "1"
|
||||
criterion = "0.3.0"
|
||||
rand = "0.7"
|
||||
|
|
@ -42,7 +42,7 @@ harness = false
|
|||
[dependencies]
|
||||
rand_core = { version = "0.5", default-features = false }
|
||||
byteorder = { version = "^1.2.3", default-features = false, features = ["i128"] }
|
||||
digest = { version = "0.8", default-features = false }
|
||||
digest = { version = "0.9", default-features = false }
|
||||
subtle = { version = "^2.2.1", default-features = false }
|
||||
serde = { version = "1.0", default-features = false, optional = true, features = ["derive"] }
|
||||
packed_simd = { version = "0.3", features = ["into_bits"], optional = true }
|
||||
|
|
|
|||
|
|
@ -689,7 +689,7 @@ impl RistrettoPoint {
|
|||
where D: Digest<OutputSize = U64> + Default
|
||||
{
|
||||
let mut hash = D::default();
|
||||
hash.input(input);
|
||||
hash.update(input);
|
||||
RistrettoPoint::from_hash(hash)
|
||||
}
|
||||
|
||||
|
|
@ -702,7 +702,7 @@ impl RistrettoPoint {
|
|||
where D: Digest<OutputSize = U64> + Default
|
||||
{
|
||||
// dealing with generic arrays is clumsy, until const generics land
|
||||
let output = hash.result();
|
||||
let output = hash.finalize();
|
||||
let mut output_bytes = [0u8; 64];
|
||||
output_bytes.copy_from_slice(&output.as_slice());
|
||||
|
||||
|
|
|
|||
|
|
@ -102,8 +102,8 @@
|
|||
//!
|
||||
//! // Streaming data into a hash object
|
||||
//! let mut hasher = Sha512::default();
|
||||
//! hasher.input(b"Abolish ");
|
||||
//! hasher.input(b"ICE");
|
||||
//! hasher.update(b"Abolish ");
|
||||
//! hasher.update(b"ICE");
|
||||
//! let a2 = Scalar::from_hash(hasher);
|
||||
//!
|
||||
//! assert_eq!(a, a2);
|
||||
|
|
@ -588,7 +588,7 @@ impl Scalar {
|
|||
where D: Digest<OutputSize = U64> + Default
|
||||
{
|
||||
let mut hash = D::default();
|
||||
hash.input(input);
|
||||
hash.update(input);
|
||||
Scalar::from_hash(hash)
|
||||
}
|
||||
|
||||
|
|
@ -630,7 +630,7 @@ impl Scalar {
|
|||
where D: Digest<OutputSize = U64>
|
||||
{
|
||||
let mut output = [0u8; 64];
|
||||
output.copy_from_slice(hash.result().as_slice());
|
||||
output.copy_from_slice(hash.finalize().as_slice());
|
||||
Scalar::from_bytes_mod_order_wide(&output)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue