Trait snarkvm_wasm::traits::utilities::ToBytesGadget [−][src]
Required methods
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
Additionally checks if the produced list of booleans is ‘valid’.
Implementations on Foreign Types
impl<F> ToBytesGadget<F> for Vec<UInt8, Global> where
F: Field, [src]
F: Field,
pub fn to_bytes<CS>(
&self,
_cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&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>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<F> ToBytesGadget<F> for [UInt8] where
F: Field, [src]
F: Field,
pub fn to_bytes<CS>(
&self,
_cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&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>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<'a, F> ToBytesGadget<F> for &'a [UInt8] where
F: Field, [src]
F: Field,
pub fn to_bytes<CS>(
&self,
_cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&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>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<'a, F, T> ToBytesGadget<F> for &'a T where
T: 'a + ToBytesGadget<F>,
F: Field, [src]
T: 'a + ToBytesGadget<F>,
F: Field,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
Implementors
impl<F> ToBytesGadget<F> for FpGadget<F> where
F: PrimeField, [src]
F: PrimeField,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<F> ToBytesGadget<F> for Boolean where
F: Field, [src]
F: Field,
pub fn to_bytes<CS>(
&self,
_cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&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>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
Additionally checks if the produced list of booleans is ‘valid’.
impl<F> ToBytesGadget<F> for Blake2sOutputGadget where
F: PrimeField, [src]
F: PrimeField,
pub fn to_bytes<CS>(
&self,
_cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&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>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<F> ToBytesGadget<F> for AllocatedFp<F> where
F: PrimeField, [src]
F: PrimeField,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<F> ToBytesGadget<F> for UInt8 where
F: Field, [src]
F: Field,
pub fn to_bytes<CS>(
&self,
_cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&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>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<F> ToBytesGadget<F> for UInt16 where
F: Field, [src]
F: Field,
pub fn to_bytes<CS>(
&self,
_cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&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>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<F> ToBytesGadget<F> for UInt32 where
F: Field, [src]
F: Field,
pub fn to_bytes<CS>(
&self,
_cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&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>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<F> ToBytesGadget<F> for UInt64 where
F: Field, [src]
F: Field,
pub fn to_bytes<CS>(
&self,
_cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&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>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<F> ToBytesGadget<F> for UInt128 where
F: Field, [src]
F: Field,
pub fn to_bytes<CS>(
&self,
_cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&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>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<G, F> ToBytesGadget<F> for GroupEncryptionPrivateKeyGadget<G> where
G: Group,
F: PrimeField, [src]
G: Group,
F: PrimeField,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<G, F, GG> ToBytesGadget<F> for GroupEncryptionCiphertextGadget<G, F, GG> where
G: Group + ProjectiveCurve,
F: Field,
GG: CompressedGroupGadget<G, F>, [src]
G: Group + ProjectiveCurve,
F: Field,
GG: CompressedGroupGadget<G, F>,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<G, F, GG> ToBytesGadget<F> for GroupEncryptionPublicKeyGadget<G, F, GG> where
G: Group + ProjectiveCurve,
F: Field,
GG: CompressedGroupGadget<G, F>, [src]
G: Group + ProjectiveCurve,
F: Field,
GG: CompressedGroupGadget<G, F>,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
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]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
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]
G: Group,
F: Field,
GG: GroupGadget<G, F>,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<P> ToBytesGadget<<P as Bls12Parameters>::Fp> for G1PreparedGadget<P> where
P: Bls12Parameters, [src]
P: Bls12Parameters,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<<P as Bls12Parameters>::Fp>, [src]
CS: ConstraintSystem<<P as Bls12Parameters>::Fp>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<<P as Bls12Parameters>::Fp>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<<P as Bls12Parameters>::Fp>,
impl<P> ToBytesGadget<<P as Bls12Parameters>::Fp> for G2PreparedGadget<P> where
P: Bls12Parameters, [src]
P: Bls12Parameters,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<<P as Bls12Parameters>::Fp>, [src]
CS: ConstraintSystem<<P as Bls12Parameters>::Fp>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<<P as Bls12Parameters>::Fp>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<<P as Bls12Parameters>::Fp>,
impl<P, F> ToBytesGadget<F> for Elligator2FieldGadget<P, F> where
P: MontgomeryModelParameters,
F: PrimeField, [src]
P: MontgomeryModelParameters,
F: PrimeField,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<P, F> ToBytesGadget<F> for Fp2Gadget<P, F> where
P: Fp2Parameters<Fp = F>,
F: PrimeField, [src]
P: Fp2Parameters<Fp = F>,
F: PrimeField,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
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]
P: Fp6Parameters,
F: PrimeField,
<P as Fp6Parameters>::Fp2Params: Fp2Parameters,
<<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
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]
P: Fp12Parameters,
F: PrimeField,
<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params: Fp2Parameters,
<<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
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]
P: SWModelParameters,
F: Field,
FG: FieldGadget<<P as ModelParameters>::BaseField, F>,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
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]
P: TEModelParameters,
F: Field,
FG: FieldGadget<<P as ModelParameters>::BaseField, F>,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<Pairing, F, P> ToBytesGadget<F> for GM17VerifyingKeyGadget<Pairing, F, P> where
P: PairingGadget<Pairing, F>,
F: Field,
Pairing: PairingEngine, [src]
P: PairingGadget<Pairing, F>,
F: Field,
Pairing: PairingEngine,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
CS: ConstraintSystem<F>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<F>,
impl<PairingE, ConstraintF, P> ToBytesGadget<ConstraintF> for VerifyingKeyGadget<PairingE, ConstraintF, P> where
P: PairingGadget<PairingE, ConstraintF>,
PairingE: PairingEngine,
ConstraintF: Field, [src]
P: PairingGadget<PairingE, ConstraintF>,
PairingE: PairingEngine,
ConstraintF: Field,
pub fn to_bytes<CS>(&self, cs: CS) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<ConstraintF>, [src]
CS: ConstraintSystem<ConstraintF>,
pub fn to_bytes_strict<CS>(
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<ConstraintF>, [src]
&self,
cs: CS
) -> Result<Vec<UInt8, Global>, SynthesisError> where
CS: ConstraintSystem<ConstraintF>,