sirsa.h

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: Norbert Loxen, Marco Eichelberg
00021  *
00022  *  Purpose:
00023  *    classes: SiRSA
00024  *
00025  *  Last Update:      $Author: meichel $
00026  *  Update Date:      $Date: 2005/12/08 16:04:43 $
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 SIRSA_H
00035 #define SIRSA_H
00036 
00037 #include "dcmtk/config/osconfig.h"
00038 #include "dcmtk/dcmsign/sialgo.h"
00039 
00040 #ifdef WITH_OPENSSL
00041 
00042 #include "dcmtk/ofstd/oftypes.h"
00043 
00044 class SiPrivateKey;
00045 struct rsa_st;
00046 typedef struct rsa_st RSA;
00047 
00053 class SiRSA : public SiAlgorithm
00054 {   
00055 public:
00056 
00060   SiRSA(RSA *key);
00061   
00063   virtual ~SiRSA();
00064 
00074   virtual OFCondition sign(
00075     const unsigned char *inputHash, 
00076     unsigned long inputHashSize,
00077     E_MACType inputHashAlgorithm,
00078     unsigned char *outputSignature,
00079     unsigned long &outputSignatureSize);
00080 
00091   virtual OFCondition verify(
00092     const unsigned char *inputHash, 
00093     unsigned long inputHashSize,
00094     E_MACType inputHashAlgorithm,
00095     const unsigned char *inputSignature,
00096     unsigned long inputSignatureSize,
00097     OFBool &verified);
00098 
00106   virtual unsigned long getSize() const;
00107 
00111   virtual E_KeyType keyType() const;    
00112 
00113 private:
00114 
00116   SiRSA(SiRSA& arg);
00117 
00119   SiRSA& operator=(SiRSA& arg);
00120 
00122   RSA *rsa;
00123 
00124 };
00125 
00126 #endif
00127 #endif
00128 
00129 /*
00130  *  $Log: sirsa.h,v $
00131  *  Revision 1.5  2005/12/08 16:04:43  meichel
00132  *  Changed include path schema for all DCMTK header files
00133  *
00134  *  Revision 1.4  2003/06/04 14:21:03  meichel
00135  *  Simplified include structure to avoid preprocessor limitation
00136  *    (max 32 #if levels) on MSVC5 with STL.
00137  *
00138  *  Revision 1.3  2001/09/26 14:30:21  meichel
00139  *  Adapted dcmsign to class OFCondition
00140  *
00141  *  Revision 1.2  2001/06/01 15:50:50  meichel
00142  *  Updated copyright header
00143  *
00144  *  Revision 1.1  2000/11/07 16:48:58  meichel
00145  *  Initial release of dcmsign module for DICOM Digital Signatures
00146  *
00147  *
00148  */
00149 


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5