Struct fcp_cryptoauth::PublicKey [] [src]

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

PublicKey for asymmetric authenticated encryption

Methods

impl PublicKey
[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 Clone for PublicKey
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialOrd<PublicKey> for PublicKey
[src]

impl Copy for PublicKey
[src]

impl AsRef<[u8]> for PublicKey
[src]

impl Serialize for PublicKey
[src]

impl Ord for PublicKey
[src]

impl Deserialize for PublicKey
[src]

impl Eq for PublicKey
[src]

impl Hash for PublicKey
[src]

Feeds this value into the given [Hasher]. Read more

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

impl PartialEq<PublicKey> for PublicKey
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for PublicKey
[src]

Formats the value using the given formatter.

impl Index<Range<usize>> for PublicKey
[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 rust_sodium API.

impl Index<RangeFrom<usize>> for PublicKey
[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 rust_sodium API.

impl Index<RangeFull> for PublicKey
[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 rust_sodium API.

impl Index<RangeTo<usize>> for PublicKey
[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 rust_sodium API.

impl FromBase32 for PublicKey
[src]

Returns a Public key from its Base32 representation.

TODO: better errors

impl ToBase32 for PublicKey
[src]

Returns the Base32 representation of a Public key

TODO: better errors