Fix warnings and spelling
This commit is contained in:
parent
fdbc206b53
commit
5506079158
1 changed files with 2 additions and 2 deletions
|
|
@ -56,7 +56,7 @@ fn calculate_models(ciphertexts: &[[u8; 16]]) -> Vec<[Vec<u8>; 16]> {
|
|||
})
|
||||
.collect();
|
||||
|
||||
for (i, c) in ciphertexts.iter().enumerate() {
|
||||
for c in ciphertexts.iter() {
|
||||
for j in 0..256 {
|
||||
for k in 0..16 {
|
||||
r[j][k].push(RSBOX[(c[k] ^ (j as u8)) as usize]);
|
||||
|
|
@ -85,7 +85,7 @@ fn read_msgs(path: impl AsRef<Path>) -> Vec<[u8; 16]> {
|
|||
}
|
||||
|
||||
let key = GenericArray::from(key);
|
||||
let mut block = GenericArray::from(msgs.clone());
|
||||
let mut block = GenericArray::from(msgs);
|
||||
let cypher = Aes128::new(&key);
|
||||
|
||||
cypher.encrypt_block(&mut block);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue