IRTCSession::put_EncryptionKey

The put_EncryptionKey property sets the encryption key to be used for one or more media streams. It must be called before answering incoming sessions, before adding participants to outgoing sessions, or before adding a stream to an existing session.

HRESULT put_EncryptionKey(longlMediaType,
BSTREncryptionKey);

Parameters

  • lMediaType
    [in] RTCMT_ constants specifying what media the encryption key applies to.
  • EncryptionKey
    [in] A string following the SDP syntax for specifying session keys. If NULL, the stream will not be encrypted.

Return Values

RTC methods may return an RTC_E_ constant.

Value Meaning
RTC_E_INVALID_SESSION_TYPE The session must be PC-PC or PC-phone.

Remarks

The application should call this method only to use an encryption key received by an out-of-band mechanism. The application is responsible for exchanging the key with the remote endpoint. The IRTCSession2::put_PreferredSecurityLevel method can be used to encrypt the media content of a PC-to-PC session. This method creates an encryption key internally and exchanges the encryption key with the remote endpoint through the SIP signaling channel.

Note  The encryption key is temporarily cached in memory in clear text.

Requirements

Client: Requires Windows XP.
Server: Requires Windows Server 2003.
Redistributable: Requires Rtcdll.dll on Windows 2000, and Windows Me/98.
Header: Declared in Rtccore.h.
Library: Included as a resource in Rtcdll.dll.
GUID: IID_IRTCSession is defined as 387c8086-99be-42fb-9973-7c0fc0ca9fa8.

See Also

IRTCSession, RTCMT_