Struct cryptoballot::EncryptedShare [−][src]
pub struct EncryptedShare(_);
Implementations
impl EncryptedShare
[src]
impl EncryptedShare
[src]pub fn new<R: Rng + CryptoRng>(
rng: &mut R,
shared_secret: [u8; 32],
share: &Scalar
) -> EncryptedShare
[src]
rng: &mut R,
shared_secret: [u8; 32],
share: &Scalar
) -> EncryptedShare
pub fn as_bytes(&self) -> &[u8]
[src]
pub fn into_bytes(self) -> Vec<u8>
[src]
pub fn from_bytes(bytes: Vec<u8>) -> Self
[src]
pub fn decrypt(
&self,
shared_secret: [u8; 32]
) -> Result<Scalar, ValidationError>
[src]
&self,
shared_secret: [u8; 32]
) -> Result<Scalar, ValidationError>
Trait Implementations
impl Clone for EncryptedShare
[src]
impl Clone for EncryptedShare
[src]fn clone(&self) -> EncryptedShare
[src]
fn clone(&self) -> EncryptedShare
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for EncryptedShare
[src]
impl Debug for EncryptedShare
[src]impl<'d> Deserialize<'d> for EncryptedShare
[src]
impl<'d> Deserialize<'d> for EncryptedShare
[src]fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'d>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'d>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl FromHex for EncryptedShare
[src]
impl FromHex for EncryptedShare
[src]impl Serialize for EncryptedShare
[src]
impl Serialize for EncryptedShare
[src]impl ToHex for EncryptedShare
[src]
impl ToHex for EncryptedShare
[src]fn encode_hex<T: FromIterator<char>>(&self) -> T
[src]
fn encode_hex<T: FromIterator<char>>(&self) -> T
[src]Encode the hex strict representing self
into the result. Lower case
letters are used (e.g. f9b4ca
) Read more
fn encode_hex_upper<T: FromIterator<char>>(&self) -> T
[src]
fn encode_hex_upper<T: FromIterator<char>>(&self) -> T
[src]Encode the hex strict representing self
into the result. Upper case
letters are used (e.g. F9B4CA
) Read more
Auto Trait Implementations
impl RefUnwindSafe for EncryptedShare
impl Send for EncryptedShare
impl Sync for EncryptedShare
impl Unpin for EncryptedShare
impl UnwindSafe for EncryptedShare
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
[src]
impl<T> Pointable for T
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,