mirror of https://github.com/zcash/halo2.git
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:
parent
6d8c899e16
commit
8b8dbbe2bb
|
@ -7,7 +7,7 @@ use subtle::ConstantTimeEq;
|
||||||
use crate::arithmetic::{Curve, CurveAffine, FieldExt};
|
use crate::arithmetic::{Curve, CurveAffine, FieldExt};
|
||||||
|
|
||||||
/// Hashes over a message and writes the output to all of `buf`.
|
/// 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};
|
use blake2b_simd::{Params as Blake2bParams, State as Blake2bState};
|
||||||
assert!(domain_separation_tag.len() < 256);
|
assert!(domain_separation_tag.len() < 256);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue