pub struct Keys { /* private fields */ }Expand description
The session’s two keys, derived from the secret and the session ID.
Implementations§
Source§impl Keys
impl Keys
Sourcepub fn derive(secret: &Secret, session: SessionId) -> Self
pub fn derive(secret: &Secret, session: SessionId) -> Self
HKDF-SHA256 over the secret, salted with the session ID, one key per direction: the keys of a session carried alone in its relay session.
Sourcepub fn derive_on(secret: &Secret, session: SessionId, channel: &str) -> Self
pub fn derive_on(secret: &Secret, session: SessionId, channel: &str) -> Self
Keys::derive, for one channel of a relay session that carries
several (channel, the session’s opaque channel ID): the channel is
in the HKDF info, so a message moved to another channel, or to the
session as a whole, does not open, even under the same secret.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Keys
impl Freeze for Keys
impl Move for Keys
impl RefUnwindSafe for Keys
impl Send for Keys
impl Sync for Keys
impl Unpin for Keys
impl UnsafeUnpin for Keys
impl UnwindSafe for Keys
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