bellman: Migrate to sha2 0.9
This commit is contained in:
parent
964532ec9f
commit
af9f5f2cf6
|
@ -27,7 +27,7 @@ subtle = "2.2.1"
|
|||
hex-literal = "0.2"
|
||||
rand = "0.7"
|
||||
rand_xorshift = "0.2"
|
||||
sha2 = "0.8"
|
||||
sha2 = "0.9"
|
||||
|
||||
[features]
|
||||
groth16 = ["pairing"]
|
||||
|
|
|
@ -343,8 +343,8 @@ mod test {
|
|||
for input_len in (0..32).chain((32..256).filter(|a| a % 8 == 0)) {
|
||||
let mut h = Sha256::new();
|
||||
let data: Vec<u8> = (0..input_len).map(|_| rng.next_u32() as u8).collect();
|
||||
h.input(&data);
|
||||
let hash_result = h.result();
|
||||
h.update(&data);
|
||||
let hash_result = h.finalize();
|
||||
|
||||
let mut cs = TestConstraintSystem::<Fr>::new();
|
||||
let mut input_bits = vec![];
|
||||
|
@ -366,7 +366,6 @@ mod test {
|
|||
assert!(cs.is_satisfied());
|
||||
|
||||
let mut s = hash_result
|
||||
.as_ref()
|
||||
.iter()
|
||||
.flat_map(|&byte| (0..8).rev().map(move |i| (byte >> i) & 1u8 == 1u8));
|
||||
|
||||
|
|
Loading…
Reference in New Issue