Trait ark_r1cs_std::bits::ToBytesGadget
source · pub trait ToBytesGadget<F: Field> {
fn to_bytes(&self) -> Result<Vec<UInt8<F>>, SynthesisError>;
fn to_non_unique_bytes(&self) -> Result<Vec<UInt8<F>>, SynthesisError> { ... }
}
Expand description
Specifies constraints for conversion to a little-endian byte representation
of self
.
Required Methods§
Provided Methods§
sourcefn to_non_unique_bytes(&self) -> Result<Vec<UInt8<F>>, SynthesisError>
fn to_non_unique_bytes(&self) -> Result<Vec<UInt8<F>>, SynthesisError>
Outputs a possibly non-unique byte decomposition of self
.
If you’re not absolutely certain that your usecase can get away with a
non-canonical representation, please use self.to_bytes(cs)
instead.