Skip to main content

encode_secured_rtps_message

Function encode_secured_rtps_message 

Source
pub fn encode_secured_rtps_message(
    plugin: &dyn CryptographicPlugin,
    local: CryptoHandle,
    remote_list: &[CryptoHandle],
    message: &[u8],
) -> Result<Vec<u8>, SecurityRtpsError>
Expand description

Protects a whole RTPS message. The first 20 bytes (header) stay plaintext; everything after it (the submessage stream) is encrypted + authenticated. Output:

[ header (20) | SRTPS_PREFIX | encrypted body | SRTPS_POSTFIX ]

§Errors

Input too short for the header, or a crypto-plugin error.