pub struct KeyMaterial {
pub client_write_key: [u8; 32],
pub server_write_key: [u8; 32],
pub client_hmac_key: [u8; 32],
pub server_hmac_key: [u8; 32],
}Expand description
OpenVPN-style key material derived from TLS session
Fields§
§client_write_key: [u8; 32]Client -> Server encryption key
server_write_key: [u8; 32]Server -> Client encryption key
client_hmac_key: [u8; 32]Client -> Server HMAC key (for tls-auth)
server_hmac_key: [u8; 32]Server -> Client HMAC key (for tls-auth)
Implementations§
Source§impl KeyMaterial
impl KeyMaterial
Sourcepub fn client_data_key(&self, suite: CipherSuite) -> DataChannelKey
pub fn client_data_key(&self, suite: CipherSuite) -> DataChannelKey
Create data channel keys for the client side
Sourcepub fn server_data_key(&self, suite: CipherSuite) -> DataChannelKey
pub fn server_data_key(&self, suite: CipherSuite) -> DataChannelKey
Create data channel keys for the server side
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyMaterial
impl RefUnwindSafe for KeyMaterial
impl Send for KeyMaterial
impl Sync for KeyMaterial
impl Unpin for KeyMaterial
impl UnwindSafe for KeyMaterial
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