[][src]Struct libzmq::auth::CurvePublicKey

pub struct CurvePublicKey { /* fields omitted */ }

A public CURVE cryptographic key in the printable Z85 representation.

Example

use libzmq::auth::*;

let cert = CurveCert::new_unique();

// Generate a public key from a curve certificate.
let public = cert.public().to_owned();
// Derive a public key from a secret key.
let derived: CurvePublicKey = cert.secret().into();

assert_eq!(public, derived);

Methods

impl CurvePublicKey[src]

pub fn new<S>(text: S) -> Result<Self, CurveError> where
    S: Into<String>, 
[src]

Create a new CurvePublicKey from a valid Z85 string.

pub fn as_str(&self) -> &str[src]

Returns the key in Z85 encoded string.

Trait Implementations

impl Eq for CurvePublicKey[src]

impl PartialEq<CurvePublicKey> for CurvePublicKey[src]

impl Clone for CurvePublicKey[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl From<CurveSecretKey> for CurvePublicKey[src]

impl<'a> From<&'a CurveSecretKey> for CurvePublicKey[src]

impl<'a> From<&'a CurvePublicKey> for CurvePublicKey[src]

impl IntoIterator for CurvePublicKey[src]

type Item = Self

The type of the elements being iterated over.

type IntoIter = IntoIter<Self>

Which kind of iterator are we turning this into?

impl<'a> IntoIterator for &'a CurvePublicKey[src]

type Item = Self

The type of the elements being iterated over.

type IntoIter = IntoIter<Self>

Which kind of iterator are we turning this into?

impl Debug for CurvePublicKey[src]

impl Display for CurvePublicKey[src]

impl Hash for CurvePublicKey[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

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

impl TryFrom<String> for CurvePublicKey[src]

type Error = CurveError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a str> for CurvePublicKey[src]

type Error = CurveError

The type returned in the event of a conversion error.

impl<'a> TryFrom<&'a String> for CurvePublicKey[src]

type Error = CurveError

The type returned in the event of a conversion error.

impl Serialize for CurvePublicKey[src]

impl<'de> Deserialize<'de> for CurvePublicKey[src]

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

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

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

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

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