[][src]Struct minisign::SecretKeyBox

pub struct SecretKeyBox(_);

A secret key and its metadata.

A SecretKeyBox represents a raw secret key, along with a key identifier, an untrusted description, and information required to decrypt it using a password.

This is what usually gets exported to disk.

A SecretKeyBox can be directly converted to/from a single-line string.

Methods

impl SecretKeyBox[src]

pub fn from_string(s: &str) -> Result<SecretKeyBox>[src]

Create a new SecretKeyBox from a string.

pub fn into_string(self) -> String[src]

Return a SecretKeyBox for a string, for storage.

pub fn into_secret_key(self, password: Option<String>) -> Result<SecretKey>[src]

Convert a SecretKeyBox to a string, for storage.

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

Return a byte representation of the secret key, for storage.

Trait Implementations

impl ToString for SecretKeyBox[src]

impl Clone for SecretKeyBox[src]

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

Performs copy-assignment from source. Read more

impl Into<String> for SecretKeyBox[src]

impl Into<SecretKeyBox> for String[src]

impl Debug for SecretKeyBox[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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.

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> Same<T> for T

type Output = T

Should always be Self