pub struct Dhke { /* private fields */ }
Implementations§
Source§impl Dhke
impl Dhke
pub fn new() -> Self
pub fn step1_alice( &self, secret_msg: impl Into<String>, blinding_factor: Option<&[u8]>, ) -> Result<(PublicKey, SecretKey), MokshaCoreError>
pub fn step2_bob( &self, b: PublicKey, a: &SecretKey, ) -> Result<PublicKey, MokshaCoreError>
pub fn step3_alice( &self, c_: PublicKey, r: SecretKey, a: PublicKey, ) -> Result<PublicKey, MokshaCoreError>
pub fn verify( &self, a: SecretKey, c: PublicKey, secret_msg: impl Into<String>, ) -> Result<bool, MokshaCoreError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dhke
impl RefUnwindSafe for Dhke
impl Send for Dhke
impl Sync for Dhke
impl Unpin for Dhke
impl UnwindSafe for Dhke
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more