DCMTK
Version 3.6.5
OFFIS DICOM Toolkit
|
This module contains classes to create digital signatures in DICOM data sets, to verify and to remove signatures. Signatures are conforming to the DICOM "Digital
Signatures" extension (formerly Supplement 41). This module requires the external OpenSSL library.
The main interface classes are:
Tools
This module contains the following command line tool:
Examples
The following example shows how to verify all signatures in a DICOM file:
{
int counter = 0;
int corrupt_counter = 0;
while (sigItem)
{
{
{
++counter;
corrupt_counter++;
}
}
}
if (counter == 0)
cerr << "no signatures found in dataset." << endl;
else
cerr << counter << " signatures verified in dataset, "
<< corrupt_counter << " corrupted." << endl;
}
The following example shows how to sign a DICOM file:
{
{
cerr << "unable to load certificate" << endl;
return;
}
{
cerr << "unable to load private key" << endl;
return;
}
{
}
}
this class manages a stack of pointers to DcmObject instances.
Definition: dcstack.h:71
a class implementing the hash function RIPEMD160
Definition: siripemd.h:40
static DcmItem * findNextSignatureItem(DcmItem &item, DcmStack &stack)
recursively browses through the given dataset and searches the next occurence of the DigitalSignature...
OFCondition createSignature(SiPrivateKey &key, SiCertificate &cert, SiMAC &mac, SiSecurityProfile &profile, E_TransferSyntax xfer=EXS_LittleEndianExplicit, const DcmAttributeTag *tagList=NULL, SiTimeStamp *timeStamp=NULL)
creates a new digital signature in the current dataset.
OFCondition selectSignature(unsigned long i)
selects one of the digital signatures from the attached dataset for reading.
OFBool bad() const
check if the status is not OK, i.e. error or failure.
Definition: ofcond.h:305
OFCondition verifyCurrent()
verifies the current signature.
this class provides the main interface to the dcmsign module - it allows to create,...
Definition: dcsignat.h:55
void detach()
detaches an attached DICOM dataset from the signature object.
Creator RSA Digital Signature Profile.
Definition: sicreapr.h:35
OFCondition loadPrivateKey(const char *filename, int filetype)
loads a private key from file.
a class representing X.509 public key certificates.
Definition: sicert.h:42
a class handling the DICOM dataset format (files without meta header)
Definition: dcdatset.h:40
void attach(DcmItem *dataset)
attaches a DICOM dataset or item to the signature object.
a class representing a list of DICOM elements in which each element has a different tag and elements ...
Definition: dcitem.h:46
OFBool good() const
check if the status is OK.
Definition: ofcond.h:296
a class representing a private key.
Definition: siprivat.h:43
OFCondition loadCertificate(const char *filename, int filetype)
loads an X.509 certificate from file.
unsigned long numberOfSignatures()
returns the number of signatures in the dataset.
static DcmItem * findFirstSignatureItem(DcmItem &item, DcmStack &stack)
recursively browses through the given dataset and searches the first occurence of the DigitalSignatur...
Generated on Fri Dec 20 2019 for DCMTK Version 3.6.5 by Doxygen 1.8.16