pub fn from_slice(slice: &[u8]) -> Option<Self> {
        if slice.len() == 16 {
            let mut raw = [0; 16];
            raw.copy_from_slice(slice);
            Some(Self::from_raw(raw))
        } else {
            None
        }
    }
/// Creates an AES key from a byte slice containing 16 bytes.
///
/// If the slice does not contain exactly 16 bytes, returns `None`.
///
/// # Examples
///
/// ```
/// # use gbl::*;
/// # fn run() -> Result<(), Error> {
/// assert!(AesKey::from_slice(&[
///		0xE7, 0xE5, 0x56, 0xB6, 0x35, 0xA3, 0x52, 0x06, // 8
/// 	0x59, 0xA2, 0xE1, 0x61, 0xCB, 0xDF, 0x4B, 0xC2, // 16
///	]).is_some());
/// # Ok(()) }    fn main() { run().unwrap() }
/// ```
///
/// Note that it is preferrable to use [`AesKey::from_raw`] when you already
/// have a fixed-size array of 16 Bytes.
///
/// When the slice does not contain 16 Bytes, this returns `None`:
///
/// ```
/// # use gbl::*;
/// # fn run() -> Result<(), Error> {
/// assert!(AesKey::from_slice(&[
///		0xE7, 0xE5, 0x56, 0xB6, 0x35, 0xA3, 0x52, 0x06, // 8
/// 	0x59, 0xA2, 0xE1, 0x61, 0xCB, 0xDF, 0x4B, 0xC2, // 16
/// 	0xFF,  // 17
///	]).is_none());
/// # Ok(()) }    fn main() { run().unwrap() }
/// ```
///
/// [`AesKey::from_raw`]: #method.from_raw
Creates an AES key from a byte slice containing 16 bytes.
If the slice does not contain exactly 16 bytes, returns `None`.
Creates an AES key from a byte slice containing 16 bytes . If the slice does not contain exactly 16 bytes returns ` None ` .
pub fn from_slice(slice: &[u8]) -> Option<Self> {
        if slice.len() == 16 {
            let mut raw = [0; 16];
            raw.copy_from_slice(slice);
            Some(Self::from_raw(raw))
        } else {
            None
        }
    }
pub fn from_slice ( slice : & [ u8 ] ) -> Option < Self > { if slice . len ( ) == 16 { let mut raw = [ 0 ; 16 ] ; raw . copy_from_slice ( slice ) ; Some ( Self :: from_raw ( raw ) ) } else { None } }
Creates an AES key from a byte slice containing 16 bytes.
Creates an AES key from a byte slice containing 16 bytes .
slice
&[u8]
examples
None
use gbl::*;
None
fn run() -> result<(), error> {
None
ok(()) }    fn main() { run().unwrap() }


Note that it is preferrable to use [`AesKey::from_raw`] when you already
have a fixed-size array of 16 Bytes.

When the slice does not contain 16 Bytes, this returns `None`.


Note that it is preferrable to use [ ` AesKey :: from_raw ` ] when you already have a fixed - size array of 16 Bytes . When the slice does not contain 16 Bytes this returns ` None ` .
use gbl::*;
None
fn run() -> result<(), error> {
None
ok(()) }    fn main() { run().unwrap() }
None