mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-10 07:08:03 -05:00
add assert
This commit is contained in:
@@ -501,11 +501,17 @@ impl ShortintParameterSet {
|
||||
}
|
||||
}
|
||||
|
||||
pub const fn encryption_key_choice(&self) -> EncryptionKeyChoice {
|
||||
pub fn encryption_key_choice(&self) -> EncryptionKeyChoice {
|
||||
match self.inner {
|
||||
ShortintParameterSetInner::PBSOnly(params) => params.encryption_key_choice(),
|
||||
ShortintParameterSetInner::WopbsOnly(params) => params.encryption_key_choice,
|
||||
ShortintParameterSetInner::PBSAndWopbs(params, _) => params.encryption_key_choice(),
|
||||
ShortintParameterSetInner::PBSAndWopbs(pbs_params, wop_pbs_params) => {
|
||||
assert_eq!(
|
||||
pbs_params.encryption_key_choice(),
|
||||
wop_pbs_params.encryption_key_choice
|
||||
);
|
||||
pbs_params.encryption_key_choice()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user