[]Struct private_currency::crypto::enc::PublicKey

#[must_use]
pub struct PublicKey(pub [u8; 32]);

PublicKey for asymmetric authenticated encryption

Methods

impl PublicKey

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 Ord for PublicKey

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl<'de> Deserialize<'de> for PublicKey

impl Serialize for PublicKey

impl Debug for PublicKey

impl Eq for PublicKey

impl Copy for PublicKey

impl Hash for PublicKey

Feeds a slice of this type into the given [Hasher]. Read more

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.

The returned type after indexing.

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.

The returned type after indexing.

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.

The returned type after indexing.

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.

The returned type after indexing.

impl PartialEq<PublicKey> for PublicKey

This method tests for !=.

impl Clone for PublicKey

Performs copy-assignment from source. Read more

impl PartialOrd<PublicKey> for PublicKey

impl AsRef<[u8]> for PublicKey

Auto Trait Implementations

impl Send for PublicKey

impl Sync for PublicKey

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> ToHex for T where
    T: AsRef<[u8]>, 

impl<T> Erased for T

impl<T> Erased for T

impl<Q, K> Equivalent for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> SerializeContent for T where
    T: Serialize
[src]

impl<T> Same for T

Should always be Self