pub fn htp2_bls12381(dst: &[u8], mess: &str) -> ECP2 {
    let m = mess.as_bytes();
    let spec_u = hash_to_field2_bls12381(hmac::MC_SHA2, ecp::HASH_TYPE, dst, m, 2);
    let mut x = ECP2::map2point(&spec_u[0]);
    let x1 = ECP2::map2point(&spec_u[1]);
    x.add(&x1);
    x.cfp();
    x.affine();
    x
}
/// Hash a message onto the BLS12-381 G2 curve
///
/// Uses <https://datatracker.ietf.org/doc/draft-irtf-cfrg-hash-to-curve/>
///
/// # Arguments
/// * `dst` a domain seperator (see the internet draft for guidance on
///   formatting)
/// * `mess` is a message that will be hashed onto G2
/// # Returns
/// An element of BLS12-381 G2
Hash a message onto the BLS12-381 G2 curve
Uses
Hash a message onto the BLS12 - 381 G2 curve Uses
pub fn htp2_bls12381(dst: &[u8], mess: &str) -> ECP2 {
    let m = mess.as_bytes();
    let spec_u = hash_to_field2_bls12381(hmac::MC_SHA2, ecp::HASH_TYPE, dst, m, 2);
    let mut x = ECP2::map2point(&spec_u[0]);
    let x1 = ECP2::map2point(&spec_u[1]);
    x.add(&x1);
    x.cfp();
    x.affine();
    x
}
pub fn htp2_bls12381 ( dst : & [ u8 ] , mess : & str ) -> ECP2 { let m = mess . as_bytes ( ) ; let spec_u = hash_to_field2_bls12381 ( hmac :: MC_SHA2 , ecp :: HASH_TYPE , dst , m , 2 ) ; let mut x = ECP2 :: map2point ( & spec_u [ 0 ] ) ; let x1 = ECP2 :: map2point ( & spec_u [ 1 ] ) ; x . add ( & x1 ) ; x . cfp ( ) ; x . affine ( ) ; x }
Hash a message onto the BLS12-381 G2 curve
Uses <https://datatracker.ietf.org/doc/draft-irtf-cfrg-hash-to-curve/>
Hash a message onto the BLS12 - 381 G2 curve Uses <https : // datatracker . ietf . org / doc / draft - irtf - cfrg - hash - to - curve / >
dst
&[u8]
mess
&str
An element of BLS12-381 G2
An element of BLS12 - 381 G2
dst
&[u8]
mess
&str