Struct kpdb::CompositeKey [] [src]

pub struct 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]

[src]

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);

[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);

[src]

Create a composite key from a password.

Examples

use kpdb::CompositeKey;

let key = CompositeKey::from_password("secret");

[src]

Gets the protected data from this composite key.

Trait Implementations

impl Clone for CompositeKey
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for CompositeKey
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for CompositeKey
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.