usecrate::{IvParams, KeyParams};/// A borrowed key and IV (nonce) with no allocation or copying.
////// The caller owns the bytes and is responsible for wiping the key. Dropping
/// this view does not modify either slice. The engine validates both lengths.
pubstructKeyWithIvRef<'a>{key:&'a [u8],
iv:&'a [u8],
}impl<'a>KeyWithIvRef<'a>{/// Borrows the key and IV without validating their lengths.
/// Constant time: does not inspect the bytes.
pubconstfnnew(key:&'a [u8], iv:&'a [u8])->Self{Self{ key, iv }}}implKeyParams forKeyWithIvRef<'_>{/// Returns the stored key bytes without copying them.
/// Constant time: does not inspect key contents.
fnkey(&self)->&[u8]{self.key
}}implIvParams forKeyWithIvRef<'_>{/// Returns the stored IV bytes without copying them.
/// Constant time: does not inspect the IV.
fniv(&self)->&[u8]{self.iv
}}