[−][src]Struct tox_crypto::curve25519xsalsa20poly1305::PrecomputedKey
Applications that send several messages to the same receiver can gain speed by
splitting seal()
into two steps, precompute()
and seal_precomputed()
.
Similarly, applications that receive several messages from the same sender can gain
speed by splitting open()
into two steps, precompute()
and open_precomputed()
.
When a PrecomputedKey
goes out of scope its contents will be zeroed out
Implementations
impl PrecomputedKey
[src]
pub fn from_slice(bs: &[u8]) -> Option<PrecomputedKey>
[src]
from_slice()
creates an object from a byte slice
This function will fail and return None
if the length of
the byte-slice isn't equal to the length of the object
Trait Implementations
impl AsRef<[u8]> for PrecomputedKey
[src]
impl Clone for PrecomputedKey
[src]
pub fn clone(&self) -> PrecomputedKey
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PrecomputedKey
[src]
impl<'de> Deserialize<'de> for PrecomputedKey
[src]
pub fn deserialize<D>(
deserializer: D
) -> Result<PrecomputedKey, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<PrecomputedKey, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
impl Drop for PrecomputedKey
[src]
impl Eq for PrecomputedKey
[src]
impl Index<Range<usize>> for PrecomputedKey
[src]
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.
type Output = [u8]
The returned type after indexing.
pub fn index(&self, _index: Range<usize>) -> &[u8]
[src]
impl Index<RangeFrom<usize>> for PrecomputedKey
[src]
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.
type Output = [u8]
The returned type after indexing.
pub fn index(&self, _index: RangeFrom<usize>) -> &[u8]
[src]
impl Index<RangeFull> for PrecomputedKey
[src]
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.
type Output = [u8]
The returned type after indexing.
pub fn index(&self, _index: RangeFull) -> &[u8]
[src]
impl Index<RangeTo<usize>> for PrecomputedKey
[src]
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.
type Output = [u8]
The returned type after indexing.
pub fn index(&self, _index: RangeTo<usize>) -> &[u8]
[src]
impl PartialEq<PrecomputedKey> for PrecomputedKey
[src]
pub fn eq(&self, other: &PrecomputedKey) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for PrecomputedKey
[src]
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Auto Trait Implementations
impl RefUnwindSafe for PrecomputedKey
[src]
impl Send for PrecomputedKey
[src]
impl Sync for PrecomputedKey
[src]
impl Unpin for PrecomputedKey
[src]
impl UnwindSafe for PrecomputedKey
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,