LDicomNet::SetDefaultEncryptionISCL

#include "ltdic.h"

L_UINT32 LDicomNet::SetDefaultEncryptionISCL(nEncryptionMode)

L_UINT32 nEncryptionMode;

/* encryption mode */

Sets the encryption mode used by the ISCL operations. This function is available in the PACS Imaging toolkits.

Parameter

Description

nEncryptionMode

Flag that specifies the encryption mode. Possible values are:

 

Value

Meaning

 

DICOM_ISCL_ENCRYPT_NONE

The data is transmitted without encryption.

 

DICOM_ISCL_ENCRYPT_DESCBC

The data is transmitted encrypted using the DES algorithm in cipher block chaining mode.

Returns

DICOM_SUCCESS

Success

DICOM_ERROR_PARAMETER

A parameter error occurred. The encryption mode will be set to DICOM_ISCL_ENCRYPT_NONE.

Comments

If an incorrect value is passed for the nEncryptionMode parameter, the encryption mode is set to DICOM_ISCL_ENCRYPT_NONE.

This function may be called after an LDicomNet object is created, regardless of whether a connection has been established.

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

See Also

Functions:

LDicomNet::StartUp, LDicomNet::Connect, LDicomNet::SetDefaultSigningISCL, LDicomNet::SetAuthDataISCL, LDicomNet::SetMaxCommBlockLengthISCL, LDicomNet::SetMaxMessageLengthISCL, LDicomNet::SetMutualAuthAlgISCL, LDicomNet::SetMutualAuthKeyISCL, LDicomNet::SetIndexForMutualAuthISCL, LDicomNet::SetEncryptKeyISCL, LDicomNet::SetIndexForEncryptISCL, Class Members

Topics:

Adding Security to a DICOM Connection

 

General Integrated Secure Communication Layer (ISCL) Information

Example

L_INT LDicomNet_SetDefaultEncryptionISCLExample(LMyDicomNet *m_pDicomNet)
{
   L_INT nRet;
   // LMyDicomNet is a class derived from LDicomNet
   LMyDicomNet *pDicomNet;
   pDicomNet = new LMyDicomNet(TEXT(""), DICOM_SECURE_ISCL);
   nRet = pDicomNet->StartUp();
   if (nRet == DICOM_SUCCESS)
      AfxMessageBox(TEXT("StartUp() Successful"));
   else
   {
      AfxMessageBox(TEXT("StartUp() Failed"));
      return nRet;
   }
   //connect to a server
   nRet = m_pDicomNet->Connect(NULL, 0, TEXT("127.0.0.1"),2761);
   if(nRet != DICOM_SUCCESS)
      AfxMessageBox(TEXT("Connect() failed"));
   else
   {
      AfxMessageBox(TEXT("Connect() successful"));
      return nRet;
   }
   nRet = pDicomNet->SetDefaultEncryptionISCL(DICOM_ISCL_ENCRYPT_DESCBC);
   if(nRet != DICOM_SUCCESS)
      return nRet;
   return DICOM_SUCCESS;
}