Available in LEADTOOLS Medical Imaging toolkits. |
LDicomNet::SetDefaultSigningISCL
#include "ltdic.h"
L_UINT32 LDicomNet::SetDefaultSigningISCL(nSignMode);
L_UINT32 nSignMode; |
/* type of message authentication code */ |
Sets the current message authentication code type. This function is available in the PACS Imaging toolkits.
Parameter |
Description |
|
nSignMode |
Flag that indicates the type of message authentication code to be used. Possible values are: |
|
|
Value |
Meaning |
|
DICOM_ISCL_MAC_NONE |
No message authentication code will be used. |
|
DICOM_ISCL_MAC_MD5 |
A 128 bit MD5 message authentication code is transmitted with the message. |
|
DICOM_ISCL_MAC_DESMAC |
A 64 bit DESMAC authentication code is transmitted with the message. |
Returns
DICOM_SUCCESS |
Success |
DICOM_ERROR_PARAMETER |
A parameter error occurred. The message authentication code will be of type DICOM_ISCL_MAC_MD5. |
Comments
The message authentication code is encrypted using the current encryption mode before being sent and decrypted after being received. The current encryption mode is set using the LDicomNet::SetDefaultEncryptionISCL function.
The encryption mode and the message authentication code type must be the same for both the sender and the receiver.
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
Example
L_INT LDicomNet_SetDefaultSigningISCLExample(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")); return nRet; } else AfxMessageBox(TEXT("Connect() successful")); nRet = pDicomNet->SetDefaultSigningISCL(DICOM_ISCL_MAC_MD5); if(nRet != DICOM_SUCCESS) return nRet; return DICOM_SUCCESS; }