Share via


IRTCSession::EncryptionKey (Windows CE 5.0)

Send Feedback

This method sets the encryption key to be used for one or more media streams.

HRESULT put_EncryptionKey(long lMediaType,BSTR EncryptionKey);

Parameters

  • lMediaType
    [in] An RTCMT_ constant specifying the media type to which the encryption key applies.

  • EncryptionKey
    [in] A string following the SDP syntax for specifying session keys.

    If the string is set to NULL, the stream is not encrypted.

Return Values

This method can return an RTC_E_ constant.

The following table shows additional information about a specific return value.

Value Description
RTC_E_INVALID_SESSION_TYPE The session must be of type PC-to-PC or PC-to-phone.

Remarks

The application must call this method before answering incoming sessions, before adding participants to outgoing sessions, or before adding a stream to an existing session.

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::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.

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

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Rtccore.h, Rtccore.idl.
Link Library: Uuid.lib.

See Also

IRTCSession | IRTCSession2::PreferredSecurityLevel

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.