dcmsign/include/dcmtk/dcmsign/sidsa.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: Marco Eichelberg
00017  *
00018  *  Purpose:
00019  *    classes: SiDSA
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 SIDSA_H
00031 #define SIDSA_H
00032 
00033 #include "dcmtk/config/osconfig.h"
00034 #include "dcmtk/dcmsign/sialgo.h"
00035 
00036 #ifdef WITH_OPENSSL
00037 
00038 #include "dcmtk/ofstd/oftypes.h"
00039 
00040 class SiPrivateKey;
00041 struct dsa_st;
00042 typedef struct dsa_st DSA;
00043 
00049 class SiDSA : public SiAlgorithm
00050 {   
00051 public:
00052 
00056   SiDSA(DSA *key);
00057 
00059   virtual ~SiDSA();
00060 
00069   virtual OFCondition sign(
00070     const unsigned char *inputHash, 
00071     unsigned long inputHashSize,
00072     E_MACType inputHashAlgorithm,
00073     unsigned char *outputSignature,
00074     unsigned long &outputSignatureSize);
00075 
00085   virtual OFCondition verify(
00086     const unsigned char *inputHash, 
00087     unsigned long inputHashSize,
00088     E_MACType inputHashAlgorithm,
00089     const unsigned char *inputSignature,
00090     unsigned long inputSignatureSize,
00091     OFBool &verified);
00092 
00100   virtual unsigned long getSize() const;
00101 
00105   virtual E_KeyType keyType() const;    
00106 
00107 private:
00108 
00110   SiDSA(SiDSA& arg);
00111 
00113   SiDSA& operator=(SiDSA& arg);
00114 
00116   DSA *dsa;
00117 
00118 };
00119 
00120 #endif
00121 #endif
00122 
00123 /*
00124  *  $Log: sidsa.h,v $
00125  *  Revision 1.6  2010-10-14 13:17:25  joergr
00126  *  Updated copyright header. Added reference to COPYRIGHT file.
00127  *
00128  *  Revision 1.5  2005-12-08 16:04:36  meichel
00129  *  Changed include path schema for all DCMTK header files
00130  *
00131  *  Revision 1.4  2003/06/04 14:21:03  meichel
00132  *  Simplified include structure to avoid preprocessor limitation
00133  *    (max 32 #if levels) on MSVC5 with STL.
00134  *
00135  *  Revision 1.3  2001/09/26 14:30:20  meichel
00136  *  Adapted dcmsign to class OFCondition
00137  *
00138  *  Revision 1.2  2001/06/01 15:50:48  meichel
00139  *  Updated copyright header
00140  *
00141  *  Revision 1.1  2000/11/07 16:48:54  meichel
00142  *  Initial release of dcmsign module for DICOM Digital Signatures
00143  *
00144  *
00145  */
00146 


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