Skip to main content

encrypt_event_keyed

Function encrypt_event_keyed 

Source
pub fn encrypt_event_keyed(
    group_key: &[u8; 32],
    keyed_leaf: &str,
    epoch: u64,
    plaintext: &[u8],
    _privacy_mode: EventPrivacy,
) -> Result<(Vec<u8>, Vec<u8>, [u8; 12], [u8; 16]), String>
Expand description

Encrypt an event with the keyed-topic + epoch bound into the AAD (EV3 confidential profile). Otherwise identical to encrypt_event.

Use when publishing under a crate::event_subject::topic_leaf routing key; the recipient reconstructs the same keyed_leaf + epoch for decrypt_event_keyed. The semantic topic name travels inside the encrypted payload, not in the AAD.