Struct fcp_cryptoauth::PublicKey
[−]
[src]
#[must_use]pub struct PublicKey(pub [u8; 32]);
PublicKey
for asymmetric authenticated encryption
Methods
impl PublicKey
[src]
fn from_slice(bs: &[u8]) -> Option<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 Clone for PublicKey
[src]
fn clone(&self) -> PublicKey
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialOrd<PublicKey> for PublicKey
[src]
fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>
fn lt(&self, other: &PublicKey) -> bool
fn le(&self, other: &PublicKey) -> bool
fn ge(&self, other: &PublicKey) -> bool
fn gt(&self, other: &PublicKey) -> bool
impl Copy for PublicKey
[src]
impl AsRef<[u8]> for PublicKey
[src]
impl Serialize for PublicKey
[src]
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
impl Ord for PublicKey
[src]
impl Deserialize for PublicKey
[src]
fn deserialize<D>(
deserializer: D
) -> Result<PublicKey, <D as Deserializer>::Error> where
D: Deserializer,
deserializer: D
) -> Result<PublicKey, <D as Deserializer>::Error> where
D: Deserializer,
impl Eq for PublicKey
[src]
impl Hash for PublicKey
[src]
fn hash<H>(&self, state: &mut H) where
H: Hasher,
H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq<PublicKey> for PublicKey
[src]
fn eq(&self, &PublicKey) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Debug for PublicKey
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error>
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]
fn from_base32(characters: &[u8]) -> Option<PublicKey>
Returns a Public key from its Base32 representation.
TODO: better errors