[][src]Struct minisign::PublicKey

pub struct PublicKey { /* fields omitted */ }

A PublicKey is used to verify signatures.

Methods

impl PublicKey[src]

pub fn from_bytes(buf: &[u8]) -> Result<PublicKey>[src]

Deserialize a PublicKey.

For storage, a PublicKeyBox is usually what you need instead.

pub fn to_bytes(&self) -> Vec<u8>[src]

Serialize a PublicKey.

For storage, a PublicKeyBox is usually what you want to use instead.

pub fn from_box(pk_box: PublicKeyBox) -> Result<PublicKey>[src]

Convert a PublicKeyBox to a PublicKey.

pub fn to_box(&self) -> Result<PublicKeyBox>[src]

Convert a PublicKey to a PublicKeyBox.

pub fn from_base64(pk_string: &str) -> Result<PublicKey>[src]

Create a minimal public key from a base64-encoded string.

pub fn to_base64(&self) -> String[src]

Encode a public key as a base64-encoded string.

pub fn from_file<P>(pk_path: P) -> Result<PublicKey> where
    P: AsRef<Path>, 
[src]

Load a PublicKeyBox from a file, and returns a PublicKey from it.

Trait Implementations

impl Clone for PublicKey[src]

impl Debug for PublicKey[src]

impl Eq for PublicKey[src]

impl Into<PublicKey> for PublicKeyBox[src]

impl PartialEq<PublicKey> for PublicKey[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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.