(
input_types: Vec<Type>,
is_input_shared: Vec<bool>,
)
| 1483 | } |
| 1484 | |
| 1485 | fn prepare_input( |
| 1486 | input_types: Vec<Type>, |
| 1487 | is_input_shared: Vec<bool>, |
| 1488 | ) -> Result<(Vec<Value>, Vec<Value>)> { |
| 1489 | let seed: [u8; 16] = [1u8, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; |
| 1490 | let mut prng = PRNG::new(Some(seed))?; |
| 1491 | let mut plain_inputs = vec![]; |
| 1492 | let mut mpc_inputs = vec![]; |
| 1493 | for i in 0..input_types.len() { |
| 1494 | let random_value = prng.get_random_value(input_types[i].clone())?; |
| 1495 | plain_inputs.push(random_value.clone()); |
| 1496 | mpc_inputs.push(prepare_value( |
| 1497 | random_value, |
| 1498 | input_types[i].clone(), |
| 1499 | is_input_shared[i].clone(), |
| 1500 | )?); |
| 1501 | } |
| 1502 | Ok((plain_inputs, mpc_inputs)) |
| 1503 | } |
| 1504 | |
| 1505 | fn check_output( |
| 1506 | plain_graph: Graph, |
no test coverage detected