DCMTK  Version 3.6.7
OFFIS DICOM Toolkit
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SiMDMAC Class Reference

a class implementing all supported hash functions using the OpenSSL EVP_MD high level API. More...

+ Inheritance diagram for SiMDMAC:

Public Member Functions

 SiMDMAC (E_MACType mactype)
 default constructor
 
virtual ~SiMDMAC ()
 destructor
 
virtual OFCondition initialize ()
 initializes the MAC algorithm. More...
 
virtual OFCondition digest (const unsigned char *data, unsigned long length)
 feeds data into the MAC algorithm More...
 
virtual OFCondition finalize (unsigned char *result)
 finalizes the MAC and writes it to the given output array, which must be at least getSize() bytes large. More...
 
virtual unsigned long getSize () const
 returns the size of a MAC in bytes. More...
 
virtual E_MACType macType () const
 returns the type of MAC algorithm computed by this object More...
 
virtual const char * getDefinedTerm () const
 returns the DICOM identifier for this MAC algorithm More...
 
- Public Member Functions inherited from SiMAC
 SiMAC ()
 default constructor
 
virtual ~SiMAC ()
 destructor
 

Private Member Functions

 SiMDMAC (SiMDMAC &arg)
 private undefined copy constructor
 
SiMDMACoperator= (SiMDMAC &arg)
 private undefined copy assignment operator
 

Private Attributes

EVP_MD_CTX * ctx
 OpenSSL MAC context.
 
E_MACType macType_
 MAC type.
 

Detailed Description

a class implementing all supported hash functions using the OpenSSL EVP_MD high level API.

Remarks
this class is only available if DCMTK is compiled with OpenSSL support enabled.

Member Function Documentation

◆ digest()

virtual OFCondition SiMDMAC::digest ( const unsigned char *  data,
unsigned long  length 
)
virtual

feeds data into the MAC algorithm

Parameters
datapointer to raw data to be fed into the MAC, must not be NULL
lengthnumber of bytes in raw data array
Returns
status code

Implements SiMAC.

◆ finalize()

virtual OFCondition SiMDMAC::finalize ( unsigned char *  result)
virtual

finalizes the MAC and writes it to the given output array, which must be at least getSize() bytes large.

After a call to finalize, the MAC algorithm must be initialized again, see initialize().

Parameters
resultpointer to array of getSize() bytes into which the MAC is written
Returns
status code

Implements SiMAC.

◆ getDefinedTerm()

virtual const char* SiMDMAC::getDefinedTerm ( ) const
virtual

returns the DICOM identifier for this MAC algorithm

Returns
DICOM defined term for algorithm

Implements SiMAC.

◆ getSize()

virtual unsigned long SiMDMAC::getSize ( ) const
virtual

returns the size of a MAC in bytes.

Returns
block size for this MAC algorithm

Implements SiMAC.

◆ initialize()

virtual OFCondition SiMDMAC::initialize ( )
virtual

initializes the MAC algorithm.

Returns
status code

Implements SiMAC.

◆ macType()

virtual E_MACType SiMDMAC::macType ( ) const
virtual

returns the type of MAC algorithm computed by this object

Returns
type of MAC algorithm

Implements SiMAC.


The documentation for this class was generated from the following file:


Generated on Thu Apr 28 2022 for DCMTK Version 3.6.7 by Doxygen 1.9.1