refactor: Fix github build pipeline

This commit is contained in:
0xalivecow 2024-10-26 18:51:07 +02:00
parent 7564869ea8
commit 8e9388c353
No known key found for this signature in database
5 changed files with 60 additions and 9 deletions

View file

@ -1,7 +1,7 @@
use std::collections::HashMap;
use crate::utils::parse::{Responses, Testcase, Testcases};
use tasks01::{block2poly::block2poly, poly2block::poly2block, sea128::sea128};
use tasks01::{block2poly::block2poly, gfmul::gfmul, poly2block::poly2block, sea128::sea128};
use anyhow::{anyhow, Result};
use serde_json::{json, Value};
@ -34,6 +34,11 @@ pub fn task_deploy(testcase: &Testcase) -> Result<Value> {
let json = json!({"output" : result});
Ok(json)
}
"gfmul" => {
let result = gfmul(args)?;
let json = json!({"product" : result});
Ok(json)
}
_ => Err(anyhow!(
"Fatal. No compatible action found. Json data was {:?}. Arguments were; {:?}",
testcase,

View file

@ -0,0 +1,48 @@
{
"testcases": {
"b856d760-023d-4b00-bad2-15d2b6da22fe": {
"action": "block2poly",
"arguments": {
"semantic": "xex",
"block": "ARIAAAAAAAAAAAAAAAAAgA=="
}
},
"254eaee7-05fd-4e0d-8292-9b658a852245": {
"action": "poly2block",
"arguments": {
"semantic": "xex",
"coefficients": [
12,
127,
9,
0
]
}
}
},
"254eaee7-05fd-4e0d-8292-9b658a852245": {
"action": "gfmul",
"arguments": {
"semantic": "xex",
"a": "ARIAAAAAAAAAAAAAAAAAgA==",
"b": "AgAAAAAAAAAAAAAAAAAAAA=="
}
},
"b856d760-023d-4b00-bad2-15d2b6da22fe": {
"action": "sea128",
"arguments": {
"mode": "encrypt",
"key": "istDASeincoolerKEYrofg==",
"input": "yv66vvrO263eyviIiDNEVQ=="
}
},
"254eaee7-05fd-4e0d-8292-9b658b852245": {
"action": "sea128",
"arguments": {
"mode": "decrypt",
"key": "istDASeincoolerKEYrofg==",
"input": "D5FDo3iVBoBN9gVi9/MSKQ=="
}
}
}