pub struct BinaryStringShare {
pub length: u64,
pub value1: Vec<u8>,
pub value2: Vec<u8>,
}Fields§
§length: u64§value1: Vec<u8>§value2: Vec<u8>Implementations§
pub fn new() -> Self
pub fn zero(length: usize) -> Self
pub fn from_constant(c: &BinaryString, party_index: usize) -> Self
pub fn from_choice(c: &BinaryShare, size: usize) -> Self
pub fn length_in_bytes(&self) -> usize
pub fn get_external_size(&self) -> usize
pub fn with_capacity(size: usize) -> Self
pub fn get(&self, index: usize) -> (bool, bool)
pub fn set(&mut self, index: usize, value1: bool, value2: bool)
pub fn push(&mut self, value1: bool, value2: bool)
pub fn reverse(&mut self)
pub fn extend(&mut self, val: &Self)
pub fn not(&self) -> Self
pub fn xor(&self, other: &Self) -> BinaryStringShare
pub fn xor_scalar(&self, scalar: &BinaryString) -> BinaryStringShare
pub fn and_scalar(&self, scalar: &BinaryString) -> BinaryStringShare
pub fn and_bitwise( &self, other: &Self, randomness: &mut CommonRandomness, ) -> BinaryString
pub fn _slice(&self, start: usize, end: usize) -> BinaryStringShare
pub fn append(&mut self, other: &Self)
pub fn split(&self, index: usize) -> (Self, Self)
Sourcepub fn append_with_padding(&mut self, other: &Self)
pub fn append_with_padding(&mut self, other: &Self)
Use only for verify mult triples
Sourcepub fn append_arith_with_padding(&mut self, other: &BinaryArithmeticShare)
pub fn append_arith_with_padding(&mut self, other: &BinaryArithmeticShare)
Use only for verify mult triples
Trait Implementations§
Source§fn clone(&self) -> BinaryStringShare
fn clone(&self) -> BinaryStringShare
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§fn default() -> BinaryStringShare
fn default() -> BinaryStringShare
Returns the “default value” for a type. Read more
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more