[−][src]Struct kpdb::CompositeKey
Composition of the user's key data.
This data type uses secstr's SecStr
to protect the key data. To
retrieve the protected data use the unsecure
method.
Methods
impl CompositeKey
[src]
pub fn from_both<S: Into<String>>(
password: S,
key_file: KeyFile
) -> CompositeKey
[src]
password: S,
key_file: KeyFile
) -> CompositeKey
Create a composite key from both a password and a key file.
Examples
use kpdb::{CompositeKey, KeyFile}; use std::fs::File; let mut file = try!(File::open("database.key")); let key_file = try!(KeyFile::open(&mut file)); let key = CompositeKey::from_both("secret", key_file);
pub fn from_key_file(key_file: KeyFile) -> CompositeKey
[src]
Create a composite key from a key file.
Examples
use kpdb::{CompositeKey, KeyFile}; use std::fs::File; let mut file = try!(File::open("database.key")); let key_file = try!(KeyFile::open(&mut file)); let key = CompositeKey::from_key_file(key_file);
pub fn from_password<S: Into<String>>(password: S) -> CompositeKey
[src]
Create a composite key from a password.
Examples
use kpdb::CompositeKey; let key = CompositeKey::from_password("secret");
pub fn unsecure(&self) -> [u8; 32]
[src]
Gets the protected data from this composite key.
Trait Implementations
impl Clone for CompositeKey
[src]
fn clone(&self) -> CompositeKey
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CompositeKey
[src]
impl PartialEq<CompositeKey> for CompositeKey
[src]
fn eq(&self, other: &CompositeKey) -> bool
[src]
fn ne(&self, other: &CompositeKey) -> bool
[src]
impl StructuralPartialEq for CompositeKey
[src]
Auto Trait Implementations
impl RefUnwindSafe for CompositeKey
impl Send for CompositeKey
impl Sync for CompositeKey
impl Unpin for CompositeKey
impl UnwindSafe for CompositeKey
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,