nn::nex::StreamSettings::SetEncryptionKey Member Function

Syntax

void SetEncryptionKey(
     const void * ptr,
     qUnsignedInt32 ptrLen
);

Parameters

Name Description
ptr Pointer to the start of the encryption key.
ptrLen Size of the encryption key.

Return Values

None.

Description

Sets an encryption key.

When using encryption, before using NetZ to execute the Session::JoinSession or Session::CreateSession function, execute Stream::GetSettings.SetIsEncryptionRequired(true); and set a key using Stream::GetSettings.SetEncryptionKey. If canceling encryption, do so after executing the NetZ::Terminate function. Operations outside the correct segment result in an assertion, or settings fail.

The length of the key can be between MIN_ENCRYPT_KEY_LEN and MAX_ENCRYPT_KEY_LEN bytes.

See Also

SetIsEncryptionRequired
MAX_ENCRYPT_KEY_LEN
MIN_ENCRYPT_KEY_LEN
GetEncryptionKeyPaylod
GetEncryptionKeyLength

Revision History

2012/09/03
Added that an assertion is generated for updates outside the correct segment.
2012/07/09
Initial version.

CONFIDENTIAL