Refine type of buf in hash_to_field as suggested by @ebfull.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2021-02-18 23:54:27 +00:00
parent 6d8c899e16
commit 8b8dbbe2bb
1 changed files with 1 additions and 1 deletions

View File

@ -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<F: FieldExt>(message: &[u8], domain_separation_tag: &[u8], buf: &mut [F]) {
pub fn hash_to_field<F: FieldExt>(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);