mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-09 06:38:06 -05:00
chore(integer): add getters to client keys
This commit is contained in:
@@ -58,6 +58,10 @@ impl CrtClientKey {
|
||||
pub fn parameters(&self) -> crate::shortint::Parameters {
|
||||
self.key.parameters()
|
||||
}
|
||||
|
||||
pub fn moduli(&self) -> &[u64] {
|
||||
self.moduli.as_slice()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<(ClientKey, Vec<u64>)> for CrtClientKey {
|
||||
|
||||
@@ -69,6 +69,10 @@ impl RadixClientKey {
|
||||
pub fn decrypt_one_block(&self, ct: &ShortintCiphertext) -> u64 {
|
||||
self.key.decrypt_one_block(ct)
|
||||
}
|
||||
|
||||
pub fn num_blocks(&self) -> usize {
|
||||
self.num_blocks
|
||||
}
|
||||
}
|
||||
|
||||
impl From<(ClientKey, usize)> for RadixClientKey {
|
||||
|
||||
Reference in New Issue
Block a user