Struct lockchain_core::crypto::Key
[−]
[src]
pub struct Key {
pub data: Vec<u8>,
}A wrapper to represent a key for encryption
Fields
data: Vec<u8>
Methods
impl Key[src]
pub fn generate() -> Key[src]
Create a new key from scratch
pub fn from_password(password: &str, salt: &str) -> Key[src]
Use a password as a key
pub fn to_slice(&self) -> [u8; 64][src]
Used to get the raw data from this key, as a slice copy
Trait Implementations
impl Debug for Key[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Eq for Key[src]
impl PartialEq for Key[src]
fn eq(&self, __arg_0: &Key) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Key) -> bool[src]
This method tests for !=.