dcmsign/include/dcmtk/dcmsign/sisha1.h

00001 /*
00002  *
00003  *  Copyright (C) 1998-2010, OFFIS e.V.
00004  *  All rights reserved.  See COPYRIGHT file for details.
00005  *
00006  *  This software and supporting documentation were developed by
00007  *
00008  *    OFFIS e.V.
00009  *    R&D Division Health
00010  *    Escherweg 2
00011  *    D-26121 Oldenburg, Germany
00012  *
00013  *
00014  *  Module: dcmsign
00015  *
00016  *  Author: Norbert Loxen, Marco Eichelberg
00017  *
00018  *  Purpose:
00019  *    classes: SiSHA1
00020  *
00021  *  Last Update:      $Author: joergr $
00022  *  Update Date:      $Date: 2010-10-14 13:17:25 $
00023  *  CVS/RCS Revision: $Revision: 1.6 $
00024  *  Status:           $State: Exp $
00025  *
00026  *  CVS/RCS Log at end of file
00027  *
00028  */
00029 
00030 #ifndef SISHA1_H
00031 #define SISHA1_H
00032 
00033 #include "dcmtk/config/osconfig.h"
00034 #include "dcmtk/dcmsign/simac.h"
00035 #include "dcmtk/dcmsign/sitypes.h"
00036 
00037 #ifdef WITH_OPENSSL
00038 
00039 struct SHAstate_st;
00040 typedef struct SHAstate_st SHA_CTX;
00041 
00045 class SiSHA1 : public SiMAC 
00046 {    
00047 public:
00049   SiSHA1();
00050 
00052   virtual ~SiSHA1();
00053   
00057   virtual OFCondition initialize();
00058   
00064   virtual OFCondition digest(const unsigned char *data, unsigned long length);
00065   
00073   virtual OFCondition finalize(unsigned char *result);
00074 
00078   virtual unsigned long getSize() const;
00079 
00083   virtual E_MACType macType() const;    
00084 
00088   virtual const char *getDefinedTerm() const;
00089 
00090 private:
00091 
00093   SiSHA1(SiSHA1& arg);
00094 
00096   SiSHA1& operator=(SiSHA1& arg);
00097 
00099   SHA_CTX *ctx;    
00100 };
00101 
00102 #endif
00103 #endif
00104 
00105 /*
00106  *  $Log: sisha1.h,v $
00107  *  Revision 1.6  2010-10-14 13:17:25  joergr
00108  *  Updated copyright header. Added reference to COPYRIGHT file.
00109  *
00110  *  Revision 1.5  2005-12-08 16:04:44  meichel
00111  *  Changed include path schema for all DCMTK header files
00112  *
00113  *  Revision 1.4  2003/06/04 14:21:03  meichel
00114  *  Simplified include structure to avoid preprocessor limitation
00115  *    (max 32 #if levels) on MSVC5 with STL.
00116  *
00117  *  Revision 1.3  2001/09/26 14:30:22  meichel
00118  *  Adapted dcmsign to class OFCondition
00119  *
00120  *  Revision 1.2  2001/06/01 15:50:51  meichel
00121  *  Updated copyright header
00122  *
00123  *  Revision 1.1  2000/11/07 16:48:58  meichel
00124  *  Initial release of dcmsign module for DICOM Digital Signatures
00125  *
00126  *
00127  */
00128 


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1