OFFIS DCMTK  Version 3.6.0
siripemd.h
1 /*
2  *
3  * Copyright (C) 1998-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmsign
15  *
16  * Author: Norbert Loxen, Marco Eichelberg
17  *
18  * Purpose:
19  * classes: SiRIPEMD160
20  *
21  * Last Update: $Author: joergr $
22  * Update Date: $Date: 2010-10-14 13:17:25 $
23  * CVS/RCS Revision: $Revision: 1.6 $
24  * Status: $State: Exp $
25  *
26  * CVS/RCS Log at end of file
27  *
28  */
29 
30 #ifndef SIRIPEMD_H
31 #define SIRIPEMD_H
32 
33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/dcmsign/simac.h"
35 #include "dcmtk/dcmsign/sitypes.h"
36 
37 #ifdef WITH_OPENSSL
38 
39 struct RIPEMD160state_st;
40 typedef struct RIPEMD160state_st RIPEMD160_CTX;
41 
45 class SiRIPEMD160 : public SiMAC
46 {
47 public:
49  SiRIPEMD160();
50 
52  virtual ~SiRIPEMD160();
53 
57  virtual OFCondition initialize();
58 
64  virtual OFCondition digest(const unsigned char *data, unsigned long length);
65 
73  virtual OFCondition finalize(unsigned char *result);
74 
78  virtual unsigned long getSize() const;
79 
83  virtual E_MACType macType() const;
84 
88  virtual const char *getDefinedTerm() const;
89 
90 private:
91 
94 
97 
99  RIPEMD160_CTX *ctx;
100 };
101 
102 #endif
103 #endif
104 
105 /*
106  * $Log: siripemd.h,v $
107  * Revision 1.6 2010-10-14 13:17:25 joergr
108  * Updated copyright header. Added reference to COPYRIGHT file.
109  *
110  * Revision 1.5 2005-12-08 16:04:42 meichel
111  * Changed include path schema for all DCMTK header files
112  *
113  * Revision 1.4 2003/06/04 14:21:03 meichel
114  * Simplified include structure to avoid preprocessor limitation
115  * (max 32 #if levels) on MSVC5 with STL.
116  *
117  * Revision 1.3 2001/09/26 14:30:21 meichel
118  * Adapted dcmsign to class OFCondition
119  *
120  * Revision 1.2 2001/06/01 15:50:50 meichel
121  * Updated copyright header
122  *
123  * Revision 1.1 2000/11/07 16:48:57 meichel
124  * Initial release of dcmsign module for DICOM Digital Signatures
125  *
126  *
127  */
128 
virtual OFCondition digest(const unsigned char *data, unsigned long length)
feeds data into the MAC algorithm
a class implementing the hash function RIPEMD160
Definition: siripemd.h:45
virtual E_MACType macType() const
returns the type of MAC algorithm computed by this object
virtual OFCondition initialize()
initializes the MAC algorithm.
SiRIPEMD160()
default constructor
virtual const char * getDefinedTerm() const
returns the DICOM identifier for this MAC algorithm
SiRIPEMD160 & operator=(SiRIPEMD160 &arg)
private undefined copy assignment operator
RIPEMD160_CTX * ctx
OpenSSL RIPEMD 160 context.
Definition: siripemd.h:99
a base class for all classes that implement hash functions.
Definition: simac.h:41
virtual ~SiRIPEMD160()
destructor
virtual unsigned long getSize() const
returns the size of a MAC in bytes.
General purpose class for condition codes.
Definition: ofcond.h:305
virtual OFCondition finalize(unsigned char *result)
finalizes the MAC and writes it to the given output array, which must be at least getSize() bytes lar...


Generated on Wed Dec 28 2016 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.8