sdp_hash

Function sdp_hash 

Source
fn sdp_hash(sdp: &str) -> [u8; 32]
Expand description

Computes SHA-256 hash of SDP (Session Description Protocol) data.

This function creates a cryptographic hash of SDP data that is used for connection authentication. The hash serves as a tamper-evident fingerprint of the connection parameters and is used in the WebRTC handshake process.

§Parameters

  • sdp - The SDP string to hash

§Returns

A 32-byte SHA-256 hash of the SDP data

§Security

The SHA-256 hash ensures that any modification to the SDP data will be detected during the connection authentication process, preventing man-in-the-middle attacks on the WebRTC handshake.