Serialization
Ciphertexts
use tfhe::FheUint8;
use tfhe::safe_serialization::{safe_deserialize, safe_serialize};
const SERIALIZE_SIZE_LIMIT: u64 = 1_000_000_000;
/// ...
fn load_fheuint8(path: &String) -> FheUint8 {
let file = fs::File::open(path).unwrap();
safe_deserialize(file, SERIALIZE_SIZE_LIMIT).unwrap()
}fn save_fheuint8(fheuint: FheUint8, path: &String) {
let file = fs::File::create(path).unwrap();
safe_serialize(fheuint, file, SERIALIZE_SIZE_LIMIT).unwrap()
}Secret Key
Last updated
Was this helpful?