Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS DICOM C++ Class Library Help

LDicomNet::GetPeerEncryptionISCL

Show in webframe

#include "ltdic.h"

L_UINT32 LDicomNet::GetPeerEncryptionISCL();

Returns a value that represents the encryption mode the sender used when sending a message. This function is available in the PACS Imaging toolkits.

Returns

Returns a value representing the current encryption mode used by the sender. 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.

Comments

This function returns a value that represents the encryption mode the sender used when sending a message to the receiver. If the encryption mode is not the same for the sender and the receiver, the message will not be sent successfully. If the MAC type is not the same on the sender and the receiver, the message will not be sent successfully.

This function can only be called by the receiver, once the sender has attempted to send a message.

To set the encryption mode, use the LDicomNet::SetDefaultEncryptionISCL function.

To set the MAC type, use the LDicomNet::SetDefaultSigningISCL function.

The encryption mode and the MAC are specified for every message, not for each connection. Every message can have a different encryption mode and MAC, keeping the connection parameters unchanged.

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::StartUp, LDicomNet::SetDefaultSigningISCL, LDicomNet::SetDefaultEncryptionISCL, LDicomNet::GetPeerMACISCL, LDicomNet::GetPeerAuthDataISCL, LDicomNet::GetPeerRequestedMessageLengthISCL, Class Members

Topics:

Sending and Receiving Messages

 

General Integrated Secure Communication Layer (ISCL) Information

Example

// LMyDicomNet is a class derived from LDicomNet

void LMyDicomNet::OnReceive(L_INT nError, L_UCHAR nType, L_UCHAR *pBuffer, L_UINT32 nBytes)
{
   UNREFERENCED_PARAMETER(pBuffer);
   UNREFERENCED_PARAMETER(nBytes);
   UNREFERENCED_PARAMETER(nType);
  
   if (nError == DICOM_ERROR_ISCL_MSG_TRANSMISSION)
   {
      L_TCHAR message[120], cryptalg[64];
      if(GetPeerEncryptionISCL() == DICOM_ISCL_ENCRYPT_NONE)
         lstrcpy(cryptalg, TEXT("no encryption"));
      else
         lstrcpy(cryptalg, TEXT("DES in cipher block chaining mode"));
      wsprintf(message, TEXT("Sender tried to send a message encrypted with %s"), cryptalg);
      AfxMessageBox(message);
   }
} 
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.