Share via


StreamSocketInformation.SessionKey Property

Definition

Get a byte array that represents the private shared secret exchanged by proximity devices.

public:
 property IBuffer ^ SessionKey { IBuffer ^ get(); };
IBuffer SessionKey();
public IBuffer SessionKey { get; }
var iBuffer = streamSocketInformation.sessionKey;
Public ReadOnly Property SessionKey As IBuffer

Property Value

A byte array that represents the private shared secret exchanged by proximity devices.

Windows requirements

App capabilities
ID_CAP_NETWORKING [Windows Phone]

Remarks

The SessionKey property is only used with a StreamSocket object created by proximity devices when initiated by tapping. The SessionKey property for a tapping device may contain an array with a private shared secret. A private shared secret is not required by a tapping device, so this property can be null.

For proximity devices initiated by tapping, the SessionKey property can be passed to Crypto runtime classes to handle encryption. For more information, see Supporting proximity and tapping, the Windows.Security.Cryptography.Core.SymmetricKeyAlgorithmProvider class, and related classes.

For other StreamSocket objects not initiated by tapping, the SessionKey property is always null.

Applies to

See also