00001 /* 00002 * 00003 * Copyright (C) 1998-2005, OFFIS 00004 * 00005 * This software and supporting documentation were developed by 00006 * 00007 * Kuratorium OFFIS e.V. 00008 * Healthcare Information and Communication Systems 00009 * Escherweg 2 00010 * D-26121 Oldenburg, Germany 00011 * 00012 * THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRANTY 00013 * REGARDING THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR 00014 * FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES OR 00015 * ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND 00016 * PERFORMANCE OF THE SOFTWARE IS WITH THE USER. 00017 * 00018 * Module: dcmsign 00019 * 00020 * Author: Marco Eichelberg 00021 * 00022 * Purpose: 00023 * classes: SiMD5 00024 * 00025 * Last Update: $Author: meichel $ 00026 * Update Date: $Date: 2005/12/08 16:04:39 $ 00027 * CVS/RCS Revision: $Revision: 1.5 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 #ifndef SIMD5_H 00035 #define SIMD5_H 00036 00037 #include "dcmtk/config/osconfig.h" 00038 #include "dcmtk/dcmsign/simac.h" 00039 #include "dcmtk/dcmsign/sitypes.h" 00040 00041 #ifdef WITH_OPENSSL 00042 00043 struct MD5state_st; 00044 typedef struct MD5state_st MD5_CTX; 00045 00049 class SiMD5 : public SiMAC 00050 { 00051 public: 00053 SiMD5(); 00054 00056 virtual ~SiMD5(); 00057 00061 virtual OFCondition initialize(); 00062 00068 virtual OFCondition digest(const unsigned char *data, unsigned long length); 00069 00077 virtual OFCondition finalize(unsigned char *result); 00078 00082 virtual unsigned long getSize() const; 00083 00087 virtual E_MACType macType() const; 00088 00092 virtual const char *getDefinedTerm() const; 00093 00094 private: 00095 00097 SiMD5(SiMD5& arg); 00098 00100 SiMD5& operator=(SiMD5& arg); 00101 00103 MD5_CTX *ctx; 00104 }; 00105 00106 #endif 00107 #endif 00108 00109 /* 00110 * $Log: simd5.h,v $ 00111 * Revision 1.5 2005/12/08 16:04:39 meichel 00112 * Changed include path schema for all DCMTK header files 00113 * 00114 * Revision 1.4 2003/06/04 14:21:03 meichel 00115 * Simplified include structure to avoid preprocessor limitation 00116 * (max 32 #if levels) on MSVC5 with STL. 00117 * 00118 * Revision 1.3 2001/09/26 14:30:20 meichel 00119 * Adapted dcmsign to class OFCondition 00120 * 00121 * Revision 1.2 2001/06/01 15:50:49 meichel 00122 * Updated copyright header 00123 * 00124 * Revision 1.1 2000/11/07 16:48:56 meichel 00125 * Initial release of dcmsign module for DICOM Digital Signatures 00126 * 00127 * 00128 */ 00129