Trait ark_r1cs_std::bits::ToBytesGadget[][src]

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

Outputs a canonical, little-endian, byte decomposition of self.

This is the correct default for 99% of use cases.

Provided methods

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.

Implementations on Foreign Types

Implementors