Struct moksha_core::dhke::Dhke
source · 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 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