@@ -26,7 +26,7 @@ Encryption Standard (AES) functionality.
2626#![ cfg( aes) ]
2727
2828use crate :: sys;
29- use std :: mem:: { size_of_val, MaybeUninit } ;
29+ use core :: mem:: { size_of_val, MaybeUninit } ;
3030
3131#[ cfg( aes_wc_block_size) ]
3232pub const AES_BLOCK_SIZE : usize = sys:: WC_AES_BLOCK_SIZE as usize ;
@@ -88,7 +88,7 @@ impl CBC {
8888 ///
8989 /// A Result which is Ok(CBC) on success or an Err containing the wolfSSL
9090 /// library return code on failure.
91- pub fn new_ex ( heap : Option < * mut std :: os :: raw :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
91+ pub fn new_ex ( heap : Option < * mut core :: ffi :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
9292 let ws_aes = new_ws_aes ( heap, dev_id) ?;
9393 let cbc = CBC { ws_aes} ;
9494 Ok ( cbc)
@@ -292,7 +292,7 @@ impl CCM {
292292 ///
293293 /// A Result which is Ok(CCM) on success or an Err containing the wolfSSL
294294 /// library return code on failure.
295- pub fn new_ex ( heap : Option < * mut std :: os :: raw :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
295+ pub fn new_ex ( heap : Option < * mut core :: ffi :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
296296 let ws_aes = new_ws_aes ( heap, dev_id) ?;
297297 let ccm = CCM { ws_aes} ;
298298 Ok ( ccm)
@@ -487,7 +487,7 @@ impl CFB {
487487 ///
488488 /// A Result which is Ok(CFB) on success or an Err containing the wolfSSL
489489 /// library return code on failure.
490- pub fn new_ex ( heap : Option < * mut std :: os :: raw :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
490+ pub fn new_ex ( heap : Option < * mut core :: ffi :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
491491 let ws_aes = new_ws_aes ( heap, dev_id) ?;
492492 let cfb = CFB { ws_aes} ;
493493 Ok ( cfb)
@@ -794,7 +794,7 @@ impl CTR {
794794 ///
795795 /// A Result which is Ok(CTR) on success or an Err containing the wolfSSL
796796 /// library return code on failure.
797- pub fn new_ex ( heap : Option < * mut std :: os :: raw :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
797+ pub fn new_ex ( heap : Option < * mut core :: ffi :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
798798 let ws_aes = new_ws_aes ( heap, dev_id) ?;
799799 let ctr = CTR { ws_aes} ;
800800 Ok ( ctr)
@@ -1075,7 +1075,7 @@ impl ECB {
10751075 ///
10761076 /// A Result which is Ok(ECB) on success or an Err containing the wolfSSL
10771077 /// library return code on failure.
1078- pub fn new_ex ( heap : Option < * mut std :: os :: raw :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
1078+ pub fn new_ex ( heap : Option < * mut core :: ffi :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
10791079 let ws_aes = new_ws_aes ( heap, dev_id) ?;
10801080 let ecb = ECB { ws_aes} ;
10811081 Ok ( ecb)
@@ -1276,7 +1276,7 @@ impl GCM {
12761276 ///
12771277 /// A Result which is Ok(GCM) on success or an Err containing the wolfSSL
12781278 /// library return code on failure.
1279- pub fn new_ex ( heap : Option < * mut std :: os :: raw :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
1279+ pub fn new_ex ( heap : Option < * mut core :: ffi :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
12801280 let ws_aes = new_ws_aes ( heap, dev_id) ?;
12811281 let gcm = GCM { ws_aes} ;
12821282 Ok ( gcm)
@@ -1499,7 +1499,7 @@ impl GCMStream {
14991499 ///
15001500 /// A Result which is Ok(GCMStream) on success or an Err containing the
15011501 /// wolfSSL library return code on failure.
1502- pub fn new_ex ( heap : Option < * mut std :: os :: raw :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
1502+ pub fn new_ex ( heap : Option < * mut core :: ffi :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
15031503 let ws_aes = new_ws_aes ( heap, dev_id) ?;
15041504 let gcmstream = GCMStream { ws_aes} ;
15051505 Ok ( gcmstream)
@@ -1751,7 +1751,7 @@ impl OFB {
17511751 ///
17521752 /// A Result which is Ok(OFB) on success or an Err containing the wolfSSL
17531753 /// library return code on failure.
1754- pub fn new_ex ( heap : Option < * mut std :: os :: raw :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
1754+ pub fn new_ex ( heap : Option < * mut core :: ffi :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
17551755 let ws_aes = new_ws_aes ( heap, dev_id) ?;
17561756 let ofb = OFB { ws_aes} ;
17571757 Ok ( ofb)
@@ -1945,7 +1945,7 @@ impl XTS {
19451945 ///
19461946 /// A Result which is Ok(XTS) on success or an Err containing the wolfSSL
19471947 /// library return code on failure.
1948- pub fn new_ex ( heap : Option < * mut std :: os :: raw :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
1948+ pub fn new_ex ( heap : Option < * mut core :: ffi :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
19491949 let ws_xtsaes = new_ws_xtsaes ( heap, dev_id) ?;
19501950 let xts = XTS { ws_xtsaes} ;
19511951 Ok ( xts)
@@ -2307,7 +2307,7 @@ impl XTSStream {
23072307 ///
23082308 /// A Result which is Ok(XTSStream) on success or an Err containing the
23092309 /// wolfSSL library return code on failure.
2310- pub fn new_ex ( heap : Option < * mut std :: os :: raw :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
2310+ pub fn new_ex ( heap : Option < * mut core :: ffi :: c_void > , dev_id : Option < i32 > ) -> Result < Self , i32 > {
23112311 let ws_xtsaes = new_ws_xtsaes ( heap, dev_id) ?;
23122312 let ws_xtsaesstreamdata: MaybeUninit < sys:: XtsAesStreamData > = MaybeUninit :: uninit ( ) ;
23132313 let ws_xtsaesstreamdata = unsafe { ws_xtsaesstreamdata. assume_init ( ) } ;
@@ -2533,7 +2533,7 @@ impl Drop for XTSStream {
25332533 }
25342534}
25352535
2536- fn new_ws_aes ( heap : Option < * mut std :: os :: raw :: c_void > , dev_id : Option < i32 > ) -> Result < sys:: Aes , i32 > {
2536+ fn new_ws_aes ( heap : Option < * mut core :: ffi :: c_void > , dev_id : Option < i32 > ) -> Result < sys:: Aes , i32 > {
25372537 let heap = match heap {
25382538 Some ( heap) => heap,
25392539 None => core:: ptr:: null_mut ( ) ,
@@ -2554,7 +2554,7 @@ fn new_ws_aes(heap: Option<*mut std::os::raw::c_void>, dev_id: Option<i32>) -> R
25542554}
25552555
25562556#[ cfg( any( aes_xts, aes_xts_stream) ) ]
2557- fn new_ws_xtsaes ( heap : Option < * mut std :: os :: raw :: c_void > , dev_id : Option < i32 > ) -> Result < sys:: XtsAes , i32 > {
2557+ fn new_ws_xtsaes ( heap : Option < * mut core :: ffi :: c_void > , dev_id : Option < i32 > ) -> Result < sys:: XtsAes , i32 > {
25582558 let heap = match heap {
25592559 Some ( heap) => heap,
25602560 None => core:: ptr:: null_mut ( ) ,
0 commit comments