dcmsign/include/dcmtk/dcmsign/sialgo.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: SiAlgorithm
00020  *
00021  *  Last Update:      $Author: joergr $
00022  *  Update Date:      $Date: 2010-10-14 13:17:24 $
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 SIALGO_H
00031 #define SIALGO_H
00032 
00033 #include "dcmtk/config/osconfig.h"
00034 #include "dcmtk/dcmsign/sitypes.h"
00035 
00036 #ifdef WITH_OPENSSL
00037 
00038 #include "dcmtk/ofstd/oftypes.h"
00039 
00046 class SiAlgorithm
00047 {    
00048 public:
00049 
00051   SiAlgorithm() { }
00052   
00054   virtual ~SiAlgorithm() { }
00055 
00065   virtual OFCondition sign(
00066     const unsigned char *inputHash, 
00067     unsigned long inputHashSize,
00068     E_MACType inputHashAlgorithm,
00069     unsigned char *outputSignature,
00070     unsigned long &outputSignatureSize) = 0;
00071 
00082   virtual OFCondition verify(
00083     const unsigned char *inputHash, 
00084     unsigned long inputHashSize,
00085     E_MACType inputHashAlgorithm,
00086     const unsigned char *inputSignature,
00087     unsigned long inputSignatureSize,
00088     OFBool &verified) = 0;
00089 
00097   virtual unsigned long getSize() const = 0;
00098 
00102   virtual E_KeyType keyType() const = 0;    
00103 
00104 };
00105 
00106 #endif
00107 #endif
00108 
00109 /*
00110  *  $Log: sialgo.h,v $
00111  *  Revision 1.6  2010-10-14 13:17:24  joergr
00112  *  Updated copyright header. Added reference to COPYRIGHT file.
00113  *
00114  *  Revision 1.5  2005-12-08 16:04:30  meichel
00115  *  Changed include path schema for all DCMTK header files
00116  *
00117  *  Revision 1.4  2003/06/04 14:21:03  meichel
00118  *  Simplified include structure to avoid preprocessor limitation
00119  *    (max 32 #if levels) on MSVC5 with STL.
00120  *
00121  *  Revision 1.3  2001/09/26 14:30:19  meichel
00122  *  Adapted dcmsign to class OFCondition
00123  *
00124  *  Revision 1.2  2001/06/01 15:50:47  meichel
00125  *  Updated copyright header
00126  *
00127  *  Revision 1.1  2000/11/07 16:48:52  meichel
00128  *  Initial release of dcmsign module for DICOM Digital Signatures
00129  *
00130  *
00131  */
00132 


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