pub fn from_cipher(cipher: C, nonce: &GenericArray<u8, U16>) -> Self {
        let mut n = [0u64; 2];

        // TODO: replace with `u64::from_be_bytes` in libcore (1.32+)
        unsafe {
            ptr::copy_nonoverlapping(nonce.as_ptr(), n.as_mut_ptr() as *mut u8, 16);
        }

        Self {
            cipher,
            nonce: conv_be(n),
            counter: 0,
            block: Default::default(),
            pos: None,
        }
    }
/// Create new CTR mode instance using initialized block cipher.
Create new CTR mode instance using initialized block cipher.
Create new CTR mode instance using initialized block cipher .
pub fn from_cipher(cipher: C, nonce: &GenericArray<u8, U16>) -> Self {
        let mut n = [0u64; 2];
        // TODO: replace with `u64::from_be_bytes` in libcore (1.32+)
        unsafe {
            ptr::copy_nonoverlapping(nonce.as_ptr(), n.as_mut_ptr() as *mut u8, 16);
        }
        Self {
            cipher,
            nonce: conv_be(n),
            counter: 0,
            block: Default::default(),
            pos: None,
        }
    }
pub fn from_cipher ( cipher : C , nonce : & GenericArray < u8 , U16 > ) -> Self { let mut n = [ 0u64 ; 2 ] ; // TODO: replace with `u64::from_be_bytes` in libcore (1.32+) unsafe { ptr :: copy_nonoverlapping ( nonce . as_ptr ( ) , n . as_mut_ptr ( ) as * mut u8 , 16 ) ; } Self { cipher , nonce : conv_be ( n ) , counter : 0 , block : Default :: default ( ) , pos : None , } }
Create new CTR mode instance using initialized block cipher.
Create new CTR mode instance using initialized block cipher .
cipher
C
nonce
&GenericArray<u8, U16>