Trait snarkvm_gadgets::bits::to_bytes::ToBytesGadget [−][src]
pub trait ToBytesGadget<F: Field> { fn to_bytes<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>; fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>; }
Required methods
fn to_bytes<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]
fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]Additionally checks if the produced list of booleans is ‘valid’.
Implementations on Foreign Types
fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]Implementors
fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]
fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]Additionally checks if the produced list of booleans is ‘valid’.
fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]impl<G: Group + ProjectiveCurve, F: Field, GG: CompressedGroupGadget<G, F>> ToBytesGadget<F> for GroupEncryptionCiphertextGadget<G, F, GG>
[src]
impl<G: Group + ProjectiveCurve, F: Field, GG: CompressedGroupGadget<G, F>> ToBytesGadget<F> for GroupEncryptionCiphertextGadget<G, F, GG>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]impl<G: Group + ProjectiveCurve, F: Field, GG: CompressedGroupGadget<G, F>> ToBytesGadget<F> for GroupEncryptionPublicKeyGadget<G, F, GG>
[src]
impl<G: Group + ProjectiveCurve, F: Field, GG: CompressedGroupGadget<G, F>> ToBytesGadget<F> for GroupEncryptionPublicKeyGadget<G, F, GG>
[src]Writes the x-coordinate of the encryption public key.
fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]
fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]Writes the x-coordinate of the encryption public key. Additionally checks if the generated list of booleans is ‘valid’.
impl<G: Group, F: Field, GG: GroupGadget<G, F>> ToBytesGadget<F> for SchnorrPublicKeyGadget<G, F, GG>
[src]
impl<G: Group, F: Field, GG: GroupGadget<G, F>> ToBytesGadget<F> for SchnorrPublicKeyGadget<G, F, GG>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]impl<P, F, FG> ToBytesGadget<F> for snarkvm_gadgets::curves::templates::bls12::affine::AffineGadget<P, F, FG> where
P: SWModelParameters,
F: Field,
FG: FieldGadget<P::BaseField, F>,
[src]
impl<P, F, FG> ToBytesGadget<F> for snarkvm_gadgets::curves::templates::bls12::affine::AffineGadget<P, F, FG> where
P: SWModelParameters,
F: Field,
FG: FieldGadget<P::BaseField, F>,
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]impl<P, F: PrimeField> ToBytesGadget<F> for Fp6Gadget<P, F> where
P: Fp6Parameters,
P::Fp2Params: Fp2Parameters<Fp = F>,
[src]
impl<P, F: PrimeField> ToBytesGadget<F> for Fp6Gadget<P, F> where
P: Fp6Parameters,
P::Fp2Params: Fp2Parameters<Fp = F>,
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]impl<P, F: PrimeField> ToBytesGadget<F> for Fp12Gadget<P, F> where
P: Fp12Parameters,
<P::Fp6Params as Fp6Parameters>::Fp2Params: Fp2Parameters<Fp = F>,
[src]
impl<P, F: PrimeField> ToBytesGadget<F> for Fp12Gadget<P, F> where
P: Fp12Parameters,
<P::Fp6Params as Fp6Parameters>::Fp2Params: Fp2Parameters<Fp = F>,
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<P::Fp>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<P::Fp>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]impl<P: MontgomeryModelParameters, F: PrimeField> ToBytesGadget<F> for Elligator2FieldGadget<P, F>
[src]
impl<P: MontgomeryModelParameters, F: PrimeField> ToBytesGadget<F> for Elligator2FieldGadget<P, F>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]impl<P: TEModelParameters, F: Field, FG: FieldGadget<P::BaseField, F>> ToBytesGadget<F> for snarkvm_gadgets::curves::templates::twisted_edwards::AffineGadget<P, F, FG>
[src]
impl<P: TEModelParameters, F: Field, FG: FieldGadget<P::BaseField, F>> ToBytesGadget<F> for snarkvm_gadgets::curves::templates::twisted_edwards::AffineGadget<P, F, FG>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]impl<Pairing: PairingEngine, F: Field, P: PairingGadget<Pairing, F>> ToBytesGadget<F> for GM17VerifyingKeyGadget<Pairing, F, P>
[src]
impl<Pairing: PairingEngine, F: Field, P: PairingGadget<Pairing, F>> ToBytesGadget<F> for GM17VerifyingKeyGadget<Pairing, F, P>
[src]fn to_bytes_strict<CS: ConstraintSystem<F>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]impl<PairingE, ConstraintF, P> ToBytesGadget<ConstraintF> for VerifyingKeyGadget<PairingE, ConstraintF, P> where
PairingE: PairingEngine,
ConstraintF: Field,
P: PairingGadget<PairingE, ConstraintF>,
[src]
impl<PairingE, ConstraintF, P> ToBytesGadget<ConstraintF> for VerifyingKeyGadget<PairingE, ConstraintF, P> where
PairingE: PairingEngine,
ConstraintF: Field,
P: PairingGadget<PairingE, ConstraintF>,
[src]fn to_bytes<CS: ConstraintSystem<ConstraintF>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<ConstraintF>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]impl<TargetField: PrimeField, BaseField: PrimeField> ToBytesGadget<BaseField> for NonNativeFieldVar<TargetField, BaseField>
[src]
impl<TargetField: PrimeField, BaseField: PrimeField> ToBytesGadget<BaseField> for NonNativeFieldVar<TargetField, BaseField>
[src]fn to_bytes<CS: ConstraintSystem<BaseField>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]
fn to_bytes<CS: ConstraintSystem<BaseField>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]Outputs the unique byte decomposition of self
in little-endian
form.
fn to_bytes_strict<CS: ConstraintSystem<BaseField>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]impl<TargetField: PrimeField, BaseField: PrimeField> ToBytesGadget<BaseField> for AllocatedNonNativeFieldVar<TargetField, BaseField>
[src]
impl<TargetField: PrimeField, BaseField: PrimeField> ToBytesGadget<BaseField> for AllocatedNonNativeFieldVar<TargetField, BaseField>
[src]fn to_bytes<CS: ConstraintSystem<BaseField>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]fn to_bytes_strict<CS: ConstraintSystem<BaseField>>(
&self,
cs: CS
) -> Result<Vec<UInt8>, SynthesisError>
[src]