Struct revault_net::noise::SecretKey
source · [−]Expand description
The static secret key used to enact Noise authenticated and encrypted channels
SecretKey
for asymmetric authenticated encryption
When a SecretKey
goes out of scope its contents
will be zeroed out
Tuple Fields
0: [u8; 32]
Implementations
sourceimpl SecretKey
impl SecretKey
The static secret key used to enact Noise authenticated and encrypted channels
sourcepub fn public_key(&self) -> PublicKey
pub fn public_key(&self) -> PublicKey
public_key()
computes the corresponding public key for a given secret key
Trait Implementations
sourceimpl<'de> Deserialize<'de> for SecretKey
impl<'de> Deserialize<'de> for SecretKey
sourcefn deserialize<D>(
deserializer: D
) -> Result<SecretKey, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<SecretKey, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Index<Range<usize>> for SecretKey
impl Index<Range<usize>> for SecretKey
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[a..b] == y[a..b]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
sourceimpl Index<RangeFrom<usize>> for SecretKey
impl Index<RangeFrom<usize>> for SecretKey
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[a..] == y[a..]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
sourceimpl Index<RangeFull> for SecretKey
impl Index<RangeFull> for SecretKey
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[] == y[]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
sourceimpl Index<RangeTo<usize>> for SecretKey
impl Index<RangeTo<usize>> for SecretKey
Allows a user to access the byte contents of an object as a slice.
WARNING: it might be tempting to do comparisons on objects
by using x[..b] == y[..b]
. This will open up for timing attacks
when comparing for example authenticator tags. Because of this only
use the comparison functions exposed by the sodiumoxide API.
sourceimpl Serialize for SecretKey
impl Serialize for SecretKey
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for SecretKey
Auto Trait Implementations
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnwindSafe for SecretKey
Blanket Implementations
impl<T> Base32Len for T where
T: AsRef<[u8]>,
impl<T> Base32Len for T where
T: AsRef<[u8]>,
fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more