File tree Expand file tree Collapse file tree
wrapper/rust/wolfssl/src/wolfcrypt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -203,6 +203,9 @@ impl CMAC {
203203
204204 /// Generate the final Cipher-based Message Authentication Code result.
205205 ///
206+ /// This function consumes the `CMAC` object since no further operations
207+ /// can be performed with it.
208+ ///
206209 /// # Parameters
207210 ///
208211 /// * `dout`: Output buffer where CMAC is written.
@@ -229,7 +232,7 @@ impl CMAC {
229232 /// let mut finalize_out = [0u8; 16];
230233 /// cmac.finalize(&mut finalize_out).expect("Error with finalize()");
231234 /// ```
232- pub fn finalize ( & mut self , dout : & mut [ u8 ] ) -> Result < ( ) , i32 > {
235+ pub fn finalize ( mut self , dout : & mut [ u8 ] ) -> Result < ( ) , i32 > {
233236 let mut dout_size = dout. len ( ) as u32 ;
234237 let rc = unsafe {
235238 ws:: wc_CmacFinalNoFree ( & mut self . ws_cmac ,
You can’t perform that action at this time.
0 commit comments