LDicomNet::SetEncryptKeyISCL

#include "ltdic.h"

L_UINT32 LDicomNet::SetEncryptKeyISCL(nIndex, key)

L_UINT32 nIndex;

/* index */

L_UINT64 key;

/* encryption key */

Sets an encryption key at the specified index in the array. This function is available in the Medical Imaging Suite toolkits.

Parameter

Description

nIndex

Index into the array of encryption keys. This index is 1-based. Possible values for this index are between 1 and 8, inclusive.

key

A 64-bit integer, in little endian byte order, that represents an encryption key.

Returns

DICOM_SUCCESS

Success. The specified key was set in the specified position in the keys array.

DICOM_ERROR_PARAMETER

A parameter error occurred. nIndex was 0 or bigger than 8.

Comments

The index of the encryption key is sent with every message sent from the sender to the receiver. Different encryption keys can be used for each message, as long as the keys of the sender and the receiver match.

Required DLLs and Libraries

LTDIC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

Platforms

Win32, x64

See Also

Functions:

LDicomNet::SetIndexForEncryptISCL, LDicomNet::SetDefaultSigningISCL, LDicomNet::SetDefaultEncryptionISCL, LDicomNet::SetAuthDataISCL, LDicomNet::SetMaxCommBlockLengthISCL, LDicomNet::SetMaxMessageLengthISCL, LDicomNet::SetMutualAuthAlgISCL, LDicomNet::SetMutualAuthKeyISCL, LDicomNet::SetIndexForMutualAuthISCL, Class Members

Topics:

Adding Security to a DICOM Connection

 

General Integrated Secure Communication Layer (ISCL) Information

Example

L_INT LDicomNet_SetEncryptKeyISCLExample()
{
   L_INT nRet; 
   // LMyDicomNet is derived from LDicomNet
   LMyDicomNet *pDicomNet;
   pDicomNet = new LMyDicomNet(TEXT(""), DICOM_SECURE_ISCL);
   nRet =pDicomNet->SetEncryptKeyISCL(1, 0x0123456789ABCDEF);
   if(nRet !=DICOM_SUCCESS)
      return nRet;
   // 64-bit value, in hexadecimal notation
   nRet =pDicomNet->SetIndexForEncryptISCL(1);
   if(nRet !=DICOM_SUCCESS)
      return nRet;
   return DICOM_SUCCESS;
}