Struct distant_core::SecretKey [−][src]
pub struct SecretKey<const N: usize>(_);
Expand description
Represents a secret key used with transport encryption and authentication
Implementations
Returns byte slice to the key’s bytes
Returns reference to array of key’s bytes
Generates a new secret key, returning success if key created or
failing if the desired key length is not between 1 and isize::MAX
Creates the key from the given byte slice, returning success if key created or failing if the byte slice does not match the desired key length
Trait Implementations
Create a new XChaCha20Poly1305 codec with a 32-byte key
Auto Trait Implementations
impl<const N: usize> RefUnwindSafe for SecretKey<N>
impl<const N: usize> UnwindSafe for SecretKey<N>
Blanket Implementations
Mutably borrows from an owned value. Read more