pub struct DataChannelKey { /* private fields */ }Expand description
Data channel encryption key with secure memory handling
Implementations§
Source§impl DataChannelKey
impl DataChannelKey
Sourcepub fn new(key: [u8; 32], cipher_suite: CipherSuite) -> Self
pub fn new(key: [u8; 32], cipher_suite: CipherSuite) -> Self
Create a new data channel key (with zero implicit IV for non-AEAD or tests)
Sourcepub fn new_with_iv(
key: [u8; 32],
implicit_iv: [u8; 12],
cipher_suite: CipherSuite,
) -> Self
pub fn new_with_iv( key: [u8; 32], implicit_iv: [u8; 12], cipher_suite: CipherSuite, ) -> Self
Create a new data channel key with implicit IV (for OpenVPN AEAD)
Sourcepub fn cipher_suite(&self) -> CipherSuite
pub fn cipher_suite(&self) -> CipherSuite
Get the cipher suite
Sourcepub fn implicit_iv(&self) -> &[u8; 12]
pub fn implicit_iv(&self) -> &[u8; 12]
Get the implicit IV
Trait Implementations§
Source§impl Drop for DataChannelKey
impl Drop for DataChannelKey
impl ZeroizeOnDrop for DataChannelKey
Auto Trait Implementations§
impl Freeze for DataChannelKey
impl RefUnwindSafe for DataChannelKey
impl Send for DataChannelKey
impl Sync for DataChannelKey
impl Unpin for DataChannelKey
impl UnwindSafe for DataChannelKey
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