From 8b8dbbe2bbf79f1e098c00f127df1a6b1afeb723 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Thu, 18 Feb 2021 23:54:27 +0000 Subject: [PATCH] Refine type of buf in hash_to_field as suggested by @ebfull. Signed-off-by: Daira Hopwood --- src/pasta/hashtocurve.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pasta/hashtocurve.rs b/src/pasta/hashtocurve.rs index fae19c9..26758f6 100644 --- a/src/pasta/hashtocurve.rs +++ b/src/pasta/hashtocurve.rs @@ -7,7 +7,7 @@ use subtle::ConstantTimeEq; use crate::arithmetic::{Curve, CurveAffine, FieldExt}; /// Hashes over a message and writes the output to all of `buf`. -pub fn hash_to_field(message: &[u8], domain_separation_tag: &[u8], buf: &mut [F]) { +pub fn hash_to_field(message: &[u8], domain_separation_tag: &[u8], buf: &mut [F; 2]) { use blake2b_simd::{Params as Blake2bParams, State as Blake2bState}; assert!(domain_separation_tag.len() < 256);