We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df4a212 commit 2721231Copy full SHA for 2721231
wrapper/rust/wolfssl/src/wolfcrypt/hmac.rs
@@ -205,12 +205,12 @@ impl HMAC {
205
pub fn finalize(&mut self, hash: &mut [u8]) -> Result<(), i32> {
206
// Check the output buffer size since wc_HmacFinal() does not accept
207
// a length parameter.
208
- let typ = self.wc_hmac.macType as u32 as i32;
+ let typ = self.wc_hmac.macType as i32;
209
let rc = unsafe { ws::wc_HmacSizeByType(typ) };
210
if rc < 0 {
211
return Err(rc);
212
}
213
- let expected_size = rc as u32 as usize;
+ let expected_size = rc as usize;
214
if hash.len() != expected_size {
215
return Err(ws::wolfCrypt_ErrorCodes_BUFFER_E);
216
0 commit comments