mirror of
https://github.com/cubixle/radius-rs.git
synced 2026-04-30 17:28:39 +01:00
Remove unnecessary casts
This commit is contained in:
+2
-2
@@ -219,7 +219,7 @@ impl AVP {
|
|||||||
let mut chunk_vec = chunk.to_vec();
|
let mut chunk_vec = chunk.to_vec();
|
||||||
let l = chunk.len();
|
let l = chunk.len();
|
||||||
if l < 16 {
|
if l < 16 {
|
||||||
chunk_vec.extend(vec![0 as u8; 16 - l]); // zero padding
|
chunk_vec.extend(vec![0; 16 - l]); // zero padding
|
||||||
}
|
}
|
||||||
|
|
||||||
let enc_block = md5::compute([secret, &buff[..]].concat()).to_vec();
|
let enc_block = md5::compute([secret, &buff[..]].concat()).to_vec();
|
||||||
@@ -319,7 +319,7 @@ impl AVP {
|
|||||||
let mut chunk_vec = chunk.to_vec();
|
let mut chunk_vec = chunk.to_vec();
|
||||||
let l = chunk.len();
|
let l = chunk.len();
|
||||||
if l < 16 {
|
if l < 16 {
|
||||||
chunk_vec.extend(vec![0 as u8; 16 - l]); // zero padding
|
chunk_vec.extend(vec![0; 16 - l]); // zero padding
|
||||||
}
|
}
|
||||||
|
|
||||||
let enc_block = md5::compute([secret, &buff[..]].concat()).to_vec();
|
let enc_block = md5::compute([secret, &buff[..]].concat()).to_vec();
|
||||||
|
|||||||
Reference in New Issue
Block a user