Trait snarkvm_wasm::traits::utilities::ToBytesGadget[][src]

pub trait ToBytesGadget<F> where
    F: Field
{ pub fn to_bytes<CS>(
        &self,
        cs: CS
    ) -> Result<Vec<UInt8, Global>, SynthesisError>
    where
        CS: ConstraintSystem<F>
;
pub fn to_bytes_strict<CS>(
        &self,
        cs: CS
    ) -> Result<Vec<UInt8, Global>, SynthesisError>
    where
        CS: ConstraintSystem<F>
; }

Required methods

pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn to_bytes_strict<CS>(
    &self,
    cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Additionally checks if the produced list of booleans is ‘valid’.

Loading content...

Implementations on Foreign Types

impl<F> ToBytesGadget<F> for Vec<UInt8, Global> where
    F: Field
[src]

impl<F> ToBytesGadget<F> for [UInt8] where
    F: Field
[src]

impl<'a, F> ToBytesGadget<F> for &'a [UInt8] where
    F: Field
[src]

impl<'a, F, T> ToBytesGadget<F> for &'a T where
    T: 'a + ToBytesGadget<F>,
    F: Field
[src]

Loading content...

Implementors

impl<F> ToBytesGadget<F> for FpGadget<F> where
    F: PrimeField
[src]

impl<F> ToBytesGadget<F> for Boolean where
    F: Field
[src]

pub fn to_bytes_strict<CS>(
    &self,
    cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Additionally checks if the produced list of booleans is ‘valid’.

impl<F> ToBytesGadget<F> for Blake2sOutputGadget where
    F: PrimeField
[src]

impl<F> ToBytesGadget<F> for AllocatedFp<F> where
    F: PrimeField
[src]

impl<F> ToBytesGadget<F> for UInt8 where
    F: Field
[src]

impl<F> ToBytesGadget<F> for UInt16 where
    F: Field
[src]

impl<F> ToBytesGadget<F> for UInt32 where
    F: Field
[src]

impl<F> ToBytesGadget<F> for UInt64 where
    F: Field
[src]

impl<F> ToBytesGadget<F> for UInt128 where
    F: Field
[src]

impl<G, F> ToBytesGadget<F> for GroupEncryptionPrivateKeyGadget<G> where
    G: Group,
    F: PrimeField
[src]

impl<G, F, GG> ToBytesGadget<F> for GroupEncryptionCiphertextGadget<G, F, GG> where
    G: Group + ProjectiveCurve,
    F: Field,
    GG: CompressedGroupGadget<G, F>, 
[src]

impl<G, F, GG> ToBytesGadget<F> for GroupEncryptionPublicKeyGadget<G, F, GG> where
    G: Group + ProjectiveCurve,
    F: Field,
    GG: CompressedGroupGadget<G, F>, 
[src]

pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Writes the x-coordinate of the encryption public key.

pub fn to_bytes_strict<CS>(
    &self,
    cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Writes the x-coordinate of the encryption public key. Additionally checks if the generated list of booleans is ‘valid’.

impl<G, F, GG> ToBytesGadget<F> for SchnorrPublicKeyGadget<G, F, GG> where
    G: Group,
    F: Field,
    GG: GroupGadget<G, F>, 
[src]

impl<P> ToBytesGadget<<P as Bls12Parameters>::Fp> for G1PreparedGadget<P> where
    P: Bls12Parameters
[src]

impl<P> ToBytesGadget<<P as Bls12Parameters>::Fp> for G2PreparedGadget<P> where
    P: Bls12Parameters
[src]

impl<P, F> ToBytesGadget<F> for Elligator2FieldGadget<P, F> where
    P: MontgomeryModelParameters,
    F: PrimeField
[src]

impl<P, F> ToBytesGadget<F> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

impl<P, F> ToBytesGadget<F> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

impl<P, F> ToBytesGadget<F> for Fp12Gadget<P, F> where
    P: Fp12Parameters,
    F: PrimeField,
    <<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

impl<P, F, FG> ToBytesGadget<F> for snarkvm_wasm::curves::templates::bls12::AffineGadget<P, F, FG> where
    P: SWModelParameters,
    F: Field,
    FG: FieldGadget<<P as ModelParameters>::BaseField, F>, 
[src]

impl<P, F, FG> ToBytesGadget<F> for snarkvm_wasm::curves::templates::twisted_edwards::AffineGadget<P, F, FG> where
    P: TEModelParameters,
    F: Field,
    FG: FieldGadget<<P as ModelParameters>::BaseField, F>, 
[src]

impl<Pairing, F, P> ToBytesGadget<F> for GM17VerifyingKeyGadget<Pairing, F, P> where
    P: PairingGadget<Pairing, F>,
    F: Field,
    Pairing: PairingEngine
[src]

impl<PairingE, ConstraintF, P> ToBytesGadget<ConstraintF> for VerifyingKeyGadget<PairingE, ConstraintF, P> where
    P: PairingGadget<PairingE, ConstraintF>,
    PairingE: PairingEngine,
    ConstraintF: Field
[src]

Loading content...