pub struct PAKEExchange;Expand description
Password-Authenticated Key Exchange.
Implementations§
Source§impl PAKEExchange
impl PAKEExchange
Sourcepub const ITERATIONS: u32 = 200_000
pub const ITERATIONS: u32 = 200_000
Default PBKDF2 iterations.
Sourcepub fn derive(
password: &str,
salt: &[u8],
role: &str,
iterations: Option<u32>,
) -> [u8; 32]
pub fn derive( password: &str, salt: &[u8], role: &str, iterations: Option<u32>, ) -> [u8; 32]
Derive key contribution from password.
Sourcepub fn combine(contributions: &[[u8; 32]]) -> [u8; 32]
pub fn combine(contributions: &[[u8; 32]]) -> [u8; 32]
Combine key contributions into session key using HMAC-SHA256.
Sourcepub fn generate_salt() -> Result<[u8; 16]>
pub fn generate_salt() -> Result<[u8; 16]>
Generate random salt.
Auto Trait Implementations§
impl Freeze for PAKEExchange
impl RefUnwindSafe for PAKEExchange
impl Send for PAKEExchange
impl Sync for PAKEExchange
impl Unpin for PAKEExchange
impl UnsafeUnpin for PAKEExchange
impl UnwindSafe for PAKEExchange
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