L_DicomGetPeerMACISCL

Summary

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

Syntax

#include "ltdic.h"

L_LTDIC_API L_UINT32 L_DicomGetPeerMACISCL(hNet)

Parameters

HDICOMNET hNet

Handle to an existing DICOM Network. This is the handle returned from the L_DicomCreateNet function.

Returns

Returns a value representing the current MAC type used by the sender. Possible values are:

Value Meaning
DICOM_ISCL_MAC_NONE No message authentication code was used.
DICOM_ISCL_MAC_MD5 A 128 bit MD5 message authentication code was transmitted with the message.
DICOM_ISCL_MAC_DESMAC A 64 bit DESMAC authentication code was transmitted with the message.

Comments

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

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

To set the MAC type, use the L_DicomSetDefaultSigningISCL function.

To set the encryption mode, use the L_DicomSetDefaultEncryptionISCL 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

Platforms

Win32, x64.

See Also

Functions

Topics

Example

L_INT DicomGetPeerMACISCLExample(L_VOID) 
{ 
   HDICOMNET hDicomNet = NULL; 
 
   hDicomNet = L_DicomCreateNetExt(MAKE_IMAGE_PATH(TEXT("")),DICOM_SECURE_ISCL, NULL); 
 
   // hDicomNet is a handle for a DICOM Network, get its value here 
   L_TCHAR message[120], signalg[40]; 
 
   if(L_DicomGetPeerMACISCL(hDicomNet) == DICOM_ISCL_MAC_NONE) 
      lstrcpy(signalg, TEXT("no message authentication code")); 
   else if(L_DicomGetPeerMACISCL(hDicomNet) == DICOM_ISCL_MAC_MD5) 
      lstrcpy(signalg, TEXT("MD5 algorithm")); 
   else 
      lstrcpy(signalg, TEXT("SHA algorithm")); 
 
   wsprintf(message, TEXT("Sender tried to send a message with MAC %s"), signalg); 
   MessageBox(NULL, message, TEXT(""), MB_OK); 
 
   return DICOM_SUCCESS; 
}  
Help Version 23.0.2024.7.1
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DICOM C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.