LEADTOOLS DICOM C++ Class Library Help > Classes and Member Functions > LDicomDS > LDicomDS Class Members > LDicomDS::GetMacAlgorithm |
Available in LEADTOOLS Medical Imaging toolkits. |
#include "ltdic.h"
L_TCHAR* LDicomDS::GetMacAlgorithm(pSignatureItem)
pDICOMELEMENT pSignatureItem; |
/* pointer to a Digital Signatures Sequence Item */ |
Returns the Message Authentication Code (MAC) Algorithm (0400,0015) used in the creation of the specified Digital Signature.
Parameter |
Description |
pSignatureItem |
Pointer to a DICOMELEMENT structure that specifies the Digital Signatures Sequence Item which corresponds to the Digital Signature. This cannot be NULL. |
Returns
The MAC Algorithm (0400,0015) used in the creation of the specified Digital Signature. The return value can be NULL. Currently, the possible values are:
Value |
Meaning |
RIPEMD160 |
The MAC Algorithm used is the RACE Integrity Primitives Evaluation (RIPEMD160) algorithm, a 160-bit cryptographic hash function. |
SHA1 |
The MAC Algorithm used is the Secure Hash Algorithm (SHA1), a 160-bit cryptographic hash function. |
MD5 |
The MAC Algorithm used is the Message Digest 5 (MD5) algorithm, which takes as input a message of arbitrary length and produces a 128-bit "message digest". |
Comments
The Digital Signatures Sequence Item of a Digital Signature should reference an Item under the MAC Parameters Sequence associated with the Digital Signatures Sequence. The MAC Algorithm (0400,0015) under the referenced MAC Parameters Sequence Item specifies the algorithm used in generating the Message Authentication Code (MAC). The encrypted MAC is the digital signature itself. You can use this function to obtain the value of this Data Element: the expected values are: "RIPEMD160", "SHA1", and "MD5".
In addition to this function, the following functions can be used to get information about the Digital Signature:
LDicomDS::GetSignatureDateTime
LDicomDS::GetSignedElementsCount
LDicomDS::GetMacTransferSyntax
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 |
Win32, x64
See Also
Example
For an example, refer to LDicomDS::VerifySignature.