pub fn from(key: &[u8]) -> Key {
        if key.len() < 64 {
            panic!("bad key length: expected >= 64 bytes, found {}", key.len());
        }

        let mut output = Key::zero();
        output.signing.copy_from_slice(&key[..SIGNED_KEY_LEN]);
        output.encryption.copy_from_slice(&key[SIGNED_KEY_LEN..COMBINED_KEY_LENGTH]);
        output
    }
/// Creates a new `Key` from a 512-bit cryptographically random string.
///
/// The supplied key must be at least 512-bits (64 bytes). For security, the
/// master key _must_ be cryptographically random.
///
/// # Panics
///
/// Panics if `key` is less than 64 bytes in length.
///
/// # Example
///
/// ```rust
/// use cookie::Key;
///
/// # /*
/// let key = { /* a cryptographically random key >= 64 bytes */ };
/// # */
/// # let key: &Vec<u8> = &(0..64).collect();
///
/// let key = Key::from(key);
/// ```
Creates a new `Key` from a 512-bit cryptographically random string.
The supplied key must be at least 512-bits (64 bytes). For security, the
master key _must_ be cryptographically random.
Creates a new ` Key ` from a 512 - bit cryptographically random string . The supplied key must be at least 512 - bits ( 64 bytes ) . For security the master key _must_ be cryptographically random .
pub fn from(key: &[u8]) -> Key {
        if key.len() < 64 {
            panic!("bad key length: expected >= 64 bytes, found {}", key.len());
        }
        let mut output = Key::zero();
        output.signing.copy_from_slice(&key[..SIGNED_KEY_LEN]);
        output.encryption.copy_from_slice(&key[SIGNED_KEY_LEN..COMBINED_KEY_LENGTH]);
        output
    }
pub fn from ( key : & [ u8 ] ) -> Key { if key . len ( ) < 64 { panic ! ( " " key len ( ) ) ; } let mut output = Key :: zero ( ) ; output . signing . copy_from_slice ( & key [ .. SIGNED_KEY_LEN ] ) ; output . encryption . copy_from_slice ( & key [ SIGNED_KEY_LEN .. COMBINED_KEY_LENGTH ] ) ; output }
Creates a new `Key` from a 512-bit cryptographically random string.
Creates a new ` Key ` from a 512 - bit cryptographically random string .
key
&[u8]
key
&[u8]
panics
Panics if `key` is less than 64 bytes in length.
Panics if ` key ` is less than 64 bytes in length .
example
```rust
use cookie::Key.
` ` ` rust use cookie :: Key .
let key = {  a cryptographically random key >= 64 bytes */ }.
let key = { a cryptographically random key > = 64 bytes * / } .
None
let key: &vec<u8> = &(0..64).collect();
None