pub struct PublicKey(pub [u8; 32]);
Expand description
PublicKey
for asymmetric authenticated encryption
Tuple Fields§
§0: [u8; 32]
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Index<Range<usize>> for PublicKey
Allows a user to access the byte contents of an object as a slice.
impl Index<Range<usize>> for PublicKey
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.
Source§impl Index<RangeFrom<usize>> for PublicKey
Allows a user to access the byte contents of an object as a slice.
impl Index<RangeFrom<usize>> for PublicKey
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.
Source§impl Index<RangeFull> for PublicKey
Allows a user to access the byte contents of an object as a slice.
impl Index<RangeFull> for PublicKey
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.
Source§impl Index<RangeTo<usize>> for PublicKey
Allows a user to access the byte contents of an object as a slice.
impl Index<RangeTo<usize>> for PublicKey
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.