pub struct BroadcastEncryption { /* private fields */ }Expand description
Efficient broadcast encryption for large groups.
Implementations§
Source§impl BroadcastEncryption
impl BroadcastEncryption
Sourcepub fn new(master_key: Option<[u8; 32]>, subgroup_size: usize) -> Result<Self>
pub fn new(master_key: Option<[u8; 32]>, subgroup_size: usize) -> Result<Self>
Create new broadcast encryption.
Sourcepub fn add_member(
&mut self,
member_id: &str,
member_key: [u8; 32],
) -> Result<u32>
pub fn add_member( &mut self, member_id: &str, member_key: [u8; 32], ) -> Result<u32>
Add member to broadcast group.
Sourcepub fn encrypt(&self, plaintext: &[u8]) -> Result<EncryptedBroadcast>
pub fn encrypt(&self, plaintext: &[u8]) -> Result<EncryptedBroadcast>
Encrypt for broadcast.
Sourcepub fn decrypt_as_member(
encrypted: &EncryptedBroadcast,
member_id: &str,
member_key: &[u8; 32],
) -> Result<Vec<u8>>
pub fn decrypt_as_member( encrypted: &EncryptedBroadcast, member_id: &str, member_key: &[u8; 32], ) -> Result<Vec<u8>>
Decrypt broadcast as member.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BroadcastEncryption
impl RefUnwindSafe for BroadcastEncryption
impl Send for BroadcastEncryption
impl Sync for BroadcastEncryption
impl Unpin for BroadcastEncryption
impl UnsafeUnpin for BroadcastEncryption
impl UnwindSafe for BroadcastEncryption
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more