Skip to content

SetDecryptionKey

function

Delphi
function SetDecryptionKey (EncryptionMethod: TEncryptionMethod; KeyValue: string): Boolean;
C++Builder
bool __fastcall SetDecryptionKey(TEncryptionMethod EncryptionMethod, System::UnicodeString KeyValue);
C#
public bool SetDecryptionKey(TEncryptionMethod EncryptionMethod, string KeyValue);
VB.NET
Public Function SetDecryptionKey(EncryptionMethod As TEncryptionMethod, KeyValue As String) As Boolean
C++/Qt
BOOL SetDecryptionKey (TEncryptionMethod EncryptionMethod, wchar_t *KeyValue);

Sets the key used to play the encrypted clips, and the key used by Decrypt_File.

Use the same key as for the encryption; an empty string disables the decryption.

For Decrypt_File and the playback of a local clip, the method is read from the header of the encrypted file (EncryptionMethod is used for the other sources). A clip that is not encrypted is played as usual even when a decryption key is set.

The playback of an encrypted clip requires the Datastead RTSP/RTMP/HTTP/ONVIF Source Filter; Decrypt_File also works with the Datastead Multipurpose Encoder alone.