Skip to content

Commit

Permalink
feat(integer): add raw parts API for the KeySwitchingKeyMaterial
Browse files Browse the repository at this point in the history
  • Loading branch information
IceTDrinker committed Jul 25, 2024
1 parent 7b14fe6 commit e7c06ef
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tfhe/src/integer/key_switching_key/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ pub struct KeySwitchingKeyMaterial {
}

impl KeySwitchingKeyMaterial {
pub fn into_raw_parts(self) -> crate::shortint::key_switching_key::KeySwitchingKeyMaterial {
let Self { material } = self;
material
}

pub fn from_raw_parts(
material: crate::shortint::key_switching_key::KeySwitchingKeyMaterial,
) -> Self {
Self { material }
}

pub fn as_view(&self) -> KeySwitchingKeyMaterialView<'_> {
KeySwitchingKeyMaterialView {
material: self.material.as_view(),
Expand Down

0 comments on commit e7c06ef

Please sign in to comment.