fn challenge_scalar<Fs>(&mut self, label: &'static [u8]) -> Fs 
    where Fs: Field // PrimeField
    {
        // ZCash Foundation way: https://github.com/zcash-hackworks/sapling-crypto/blob/master/src/jubjub/mod.rs
        // let mut buf = [0; 64];
        // self.challenge_bytes(label, &mut buf);
        // <Fs as ::jubjub::ToUniform>::to_uniform(buf)

        // Ugly hack for crates that only generate scalars from an Rng
        use rand_core::SeedableRng;
        let mut buf = [0; 32];
        self.challenge_bytes(label, &mut buf);
        let mut rng = ::rand_chacha::ChaChaRng::from_seed(buf);

        // Zexe way: https://github.com/scipr-lab/zexe/blob/master/algebra-core/src/rand.rs
        // rng.sample(::rand::distributions::Standard)

        // ZCash ECC's way using zcash_primitives::jubjub
        // What the fuck are they thinking?
        <Fs as Field>::random(&mut rng)
    }
/// Produce the public challenge scalar `e`.
Produce the public challenge scalar `e`.
Produce the public challenge scalar ` e ` .
fn challenge_scalar<Fs>(&mut self, label: &'static [u8]) -> Fs 
    where Fs: Field // PrimeField
    {
        // ZCash Foundation way: https://github.com/zcash-hackworks/sapling-crypto/blob/master/src/jubjub/mod.rs
        // let mut buf = [0; 64];
        // self.challenge_bytes(label, &mut buf);
        // <Fs as ::jubjub::ToUniform>::to_uniform(buf)
        // Ugly hack for crates that only generate scalars from an Rng
        use rand_core::SeedableRng;
        let mut buf = [0; 32];
        self.challenge_bytes(label, &mut buf);
        let mut rng = ::rand_chacha::ChaChaRng::from_seed(buf);
        // Zexe way: https://github.com/scipr-lab/zexe/blob/master/algebra-core/src/rand.rs
        // rng.sample(::rand::distributions::Standard)
        // ZCash ECC's way using zcash_primitives::jubjub
        // What the fuck are they thinking?
        <Fs as Field>::random(&mut rng)
    }
fn challenge_scalar < Fs > ( & mut self , label : & ' static [ u8 ] ) -> Fs where Fs : Field // PrimeField { // ZCash Foundation way: https://github.com/zcash-hackworks/sapling-crypto/blob/master/src/jubjub/mod.rs // let mut buf = [0; 64]; // self.challenge_bytes(label, &mut buf); // <Fs as ::jubjub::ToUniform>::to_uniform(buf) // Ugly hack for crates that only generate scalars from an Rng use rand_core :: SeedableRng ; let mut buf = [ 0 ; 32 ] ; self . challenge_bytes ( label , & mut buf ) ; let mut rng = :: rand_chacha :: ChaChaRng :: from_seed ( buf ) ; // Zexe way: https://github.com/scipr-lab/zexe/blob/master/algebra-core/src/rand.rs // rng.sample(::rand::distributions::Standard) // ZCash ECC's way using zcash_primitives::jubjub // What the fuck are they thinking? < Fs as Field > :: random ( & mut rng ) }
Produce the public challenge scalar `e`.
Produce the public challenge scalar ` e ` .
&mut self
label
&'static [u8]
&mut self
label
&'static [u8]