Merge refactoring changes #34

Merged
0xalivecow merged 4 commits from dev into main 2024-12-23 09:31:55 +00:00
7 changed files with 5 additions and 8 deletions
Showing only changes of commit 848ad15bb8 - Show all commits

View file

@ -21,7 +21,6 @@ pub fn gfmul_task(args: &Value) -> Result<Vec<u8>> {
#[cfg(test)]
mod tests {
use serde_json::json;
use std::str::FromStr;
// Note this useful idiom: importing names from outer (for mod tests) scope.
use super::*;

View file

@ -54,7 +54,7 @@ pub fn padding_oracle(args: &Value) -> Result<Vec<u8>> {
// TODO: Collect all and send in one
let mut payload: Vec<u8> = Vec::with_capacity(2 + 16 * 265);
payload.extend(l_msg.to_vec());
for j in 0..q_block_count {
for _j in 0..q_block_count {
// Next byte
payload.extend(&attack_counter);
attack_counter[i as usize] += 1;
@ -140,7 +140,6 @@ pub fn padding_oracle(args: &Value) -> Result<Vec<u8>> {
#[cfg(test)]
mod tests {
use super::*;
use serde_json::json;
#[test]
fn test_connection() -> Result<()> {

View file

@ -1,4 +1,4 @@
use crate::utils::poly::{polynomial_2_block};
use crate::utils::poly::polynomial_2_block;
use anyhow::{Ok, Result};
use serde_json::Value;

View file

@ -75,7 +75,7 @@ mod tests {
}
println!("Result: {:?}", result);
let bit_indices: Vec<u8> = vec![0];
let _bit_indices: Vec<u8> = vec![0];
assert!(false)
}
}

View file

@ -337,7 +337,6 @@ impl ByteArray {
#[cfg(test)]
mod tests {
use super::*;
use serde_json::json;
#[test]
fn test_byte_array_shift1() {

View file

@ -788,7 +788,7 @@ mod tests {
#[test]
fn coeff_to_binary() {
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);
assert_eq!(
BASE64_STANDARD.encode(calculated_num.to_ne_bytes()),

View file

@ -86,7 +86,7 @@ mod tests {
}
println!("{:?}", result);
let bit_indices: Vec<u8> = vec![0];
let _bit_indices: Vec<u8> = vec![0];
assert!(false)
}
}