refactor: Remove unneded imports
This commit is contained in:
parent
c9c26b3971
commit
848ad15bb8
7 changed files with 5 additions and 8 deletions
|
|
@ -21,7 +21,6 @@ pub fn gfmul_task(args: &Value) -> Result<Vec<u8>> {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
// Note this useful idiom: importing names from outer (for mod tests) scope.
|
// Note this useful idiom: importing names from outer (for mod tests) scope.
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ pub fn padding_oracle(args: &Value) -> Result<Vec<u8>> {
|
||||||
// TODO: Collect all and send in one
|
// TODO: Collect all and send in one
|
||||||
let mut payload: Vec<u8> = Vec::with_capacity(2 + 16 * 265);
|
let mut payload: Vec<u8> = Vec::with_capacity(2 + 16 * 265);
|
||||||
payload.extend(l_msg.to_vec());
|
payload.extend(l_msg.to_vec());
|
||||||
for j in 0..q_block_count {
|
for _j in 0..q_block_count {
|
||||||
// Next byte
|
// Next byte
|
||||||
payload.extend(&attack_counter);
|
payload.extend(&attack_counter);
|
||||||
attack_counter[i as usize] += 1;
|
attack_counter[i as usize] += 1;
|
||||||
|
|
@ -140,7 +140,6 @@ pub fn padding_oracle(args: &Value) -> Result<Vec<u8>> {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use serde_json::json;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_connection() -> Result<()> {
|
fn test_connection() -> Result<()> {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use crate::utils::poly::{polynomial_2_block};
|
use crate::utils::poly::polynomial_2_block;
|
||||||
use anyhow::{Ok, Result};
|
use anyhow::{Ok, Result};
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("Result: {:?}", result);
|
println!("Result: {:?}", result);
|
||||||
let bit_indices: Vec<u8> = vec![0];
|
let _bit_indices: Vec<u8> = vec![0];
|
||||||
assert!(false)
|
assert!(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -337,7 +337,6 @@ impl ByteArray {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use serde_json::json;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_byte_array_shift1() {
|
fn test_byte_array_shift1() {
|
||||||
|
|
|
||||||
|
|
@ -788,7 +788,7 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn coeff_to_binary() {
|
fn coeff_to_binary() {
|
||||||
let coefficients: Vec<u8> = vec![12, 127, 9, 0];
|
let coefficients: Vec<u8> = vec![12, 127, 9, 0];
|
||||||
let b64: &str = "ARIAAAAAAAAAAAAAAAAAgA==";
|
let _b64: &str = "ARIAAAAAAAAAAAAAAAAAgA==";
|
||||||
let calculated_num: u128 = coefficient_to_binary(coefficients);
|
let calculated_num: u128 = coefficient_to_binary(coefficients);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
BASE64_STANDARD.encode(calculated_num.to_ne_bytes()),
|
BASE64_STANDARD.encode(calculated_num.to_ne_bytes()),
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("{:?}", result);
|
println!("{:?}", result);
|
||||||
let bit_indices: Vec<u8> = vec![0];
|
let _bit_indices: Vec<u8> = vec![0];
|
||||||
assert!(false)
|
assert!(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue