[−][src]Struct sapling_crypto_ce::circuit::uint32::UInt32
Represents an interpretation of 32 Boolean
objects as an
unsigned integer.
Methods
impl UInt32
[src]
pub fn constant(value: u32) -> Self
[src]
Construct a constant UInt32
from a u32
pub fn alloc<E, CS>(cs: CS, value: Option<u32>) -> Result<Self, SynthesisError> where
E: Engine,
CS: ConstraintSystem<E>,
[src]
E: Engine,
CS: ConstraintSystem<E>,
Allocate a UInt32
in the constraint system
pub fn into_bits_be(&self) -> Vec<Boolean>
[src]
pub fn from_bits_be(bits: &[Boolean]) -> Self
[src]
pub fn into_bits(&self) -> Vec<Boolean>
[src]
Turns this UInt32
into its little-endian byte order representation.
pub fn from_bits(bits: &[Boolean]) -> Self
[src]
Converts a little-endian byte order representation of bits into a
UInt32
.
pub fn rotr(&self, by: usize) -> Self
[src]
pub fn shr(&self, by: usize) -> Self
[src]
pub fn sha256_maj<E, CS>(
cs: CS,
a: &Self,
b: &Self,
c: &Self
) -> Result<Self, SynthesisError> where
E: Engine,
CS: ConstraintSystem<E>,
[src]
cs: CS,
a: &Self,
b: &Self,
c: &Self
) -> Result<Self, SynthesisError> where
E: Engine,
CS: ConstraintSystem<E>,
Compute the maj
value (a and b) xor (a and c) xor (b and c)
during SHA256.
pub fn sha256_ch<E, CS>(
cs: CS,
a: &Self,
b: &Self,
c: &Self
) -> Result<Self, SynthesisError> where
E: Engine,
CS: ConstraintSystem<E>,
[src]
cs: CS,
a: &Self,
b: &Self,
c: &Self
) -> Result<Self, SynthesisError> where
E: Engine,
CS: ConstraintSystem<E>,
Compute the ch
value (a and b) xor ((not a) and c)
during SHA256.
pub fn xor<E, CS>(&self, cs: CS, other: &Self) -> Result<Self, SynthesisError> where
E: Engine,
CS: ConstraintSystem<E>,
[src]
E: Engine,
CS: ConstraintSystem<E>,
XOR this UInt32
with another UInt32
pub fn addmany<E, CS, M>(
cs: M,
operands: &[Self]
) -> Result<Self, SynthesisError> where
E: Engine,
CS: ConstraintSystem<E>,
M: ConstraintSystem<E, Root = MultiEq<E, CS>>,
[src]
cs: M,
operands: &[Self]
) -> Result<Self, SynthesisError> where
E: Engine,
CS: ConstraintSystem<E>,
M: ConstraintSystem<E, Root = MultiEq<E, CS>>,
Perform modular addition of several UInt32
objects.
Trait Implementations
Auto Trait Implementations
impl Send for UInt32
impl Sync for UInt32
impl Unpin for UInt32
impl UnwindSafe for UInt32
impl RefUnwindSafe for UInt32
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self