void ChooserEncoder::encode(BigUInt value, ChooserPoly &destination)
 {
     BigPoly value_poly = encoder_.encode(value);
     destination.reset();
     destination.max_coeff_count() = value_poly.significant_coeff_count();
     destination.max_abs_value() = poly_infty_norm_coeffmod(value_poly, encoder_.plain_modulus());
 }
Beispiel #2
0
 void ChooserEncoder::encode(BigUInt value, ChooserPoly &destination)
 {
     Plaintext value_poly;
     encoder_.encode(value, value_poly);
     destination.reset();
     destination.max_coeff_count() = value_poly.significant_coeff_count();
     destination.max_abs_value() = poly_infty_norm_coeffmod(
         value_poly.data(), value_poly.coeff_count(), encoder_.plain_modulus());
 }