Skip to content

Commit c4b4c04

Browse files
committed
fix: all uses of hash_to_field in other crates
1 parent 4a0553a commit c4b4c04

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

k256/src/arithmetic/hash2curve.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,12 +353,12 @@ mod tests {
353353

354354
for test_vector in TEST_VECTORS {
355355
// in parts
356-
let mut u = [FieldElement::default(), FieldElement::default()];
357-
hash2curve::hash_to_field::<
356+
let u = hash2curve::hash_to_field::<
357+
2,
358358
ExpandMsgXmd<Sha256>,
359359
<Secp256k1 as GroupDigest>::K,
360360
FieldElement,
361-
>(&[test_vector.msg], &[DST], &mut u)
361+
>(&[test_vector.msg], &[DST])
362362
.unwrap();
363363
assert_eq!(u[0].to_bytes().as_slice(), test_vector.u_0);
364364
assert_eq!(u[1].to_bytes().as_slice(), test_vector.u_1);

p256/src/arithmetic/hash2curve.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,12 @@ mod tests {
204204

205205
for test_vector in TEST_VECTORS {
206206
// in parts
207-
let mut u = [FieldElement::default(), FieldElement::default()];
208-
hash2curve::hash_to_field::<
207+
let u = hash2curve::hash_to_field::<
208+
2,
209209
ExpandMsgXmd<Sha256>,
210210
<NistP256 as GroupDigest>::K,
211211
FieldElement,
212-
>(&[test_vector.msg], &[DST], &mut u)
212+
>(&[test_vector.msg], &[DST])
213213
.unwrap();
214214

215215
/// Assert that the provided projective point matches the given test vector.

p384/src/arithmetic/hash2curve.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,12 @@ mod tests {
209209

210210
for test_vector in TEST_VECTORS {
211211
// in parts
212-
let mut u = [FieldElement::default(), FieldElement::default()];
213-
hash2curve::hash_to_field::<
212+
let u = hash2curve::hash_to_field::<
213+
2,
214214
ExpandMsgXmd<Sha384>,
215215
<NistP384 as GroupDigest>::K,
216216
FieldElement,
217-
>(&[test_vector.msg], &[DST], &mut u)
217+
>(&[test_vector.msg], &[DST])
218218
.unwrap();
219219

220220
/// Assert that the provided projective point matches the given test vector.

p521/src/arithmetic/hash2curve.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,12 @@ mod tests {
212212

213213
for test_vector in TEST_VECTORS {
214214
// in parts
215-
let mut u = [FieldElement::default(), FieldElement::default()];
216-
hash2curve::hash_to_field::<
215+
let u = hash2curve::hash_to_field::<
216+
2,
217217
ExpandMsgXmd<Sha512>,
218218
<NistP521 as GroupDigest>::K,
219219
FieldElement,
220-
>(&[test_vector.msg], &[DST], &mut u)
220+
>(&[test_vector.msg], &[DST])
221221
.unwrap();
222222

223223
/// Assert that the provided projective point matches the given test vector.

0 commit comments

Comments
 (0)