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: SiRSA 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 SIRSA_H 00031 #define SIRSA_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 rsa_st; 00042 typedef struct rsa_st RSA; 00043 00049 class SiRSA : public SiAlgorithm 00050 { 00051 public: 00052 00056 SiRSA(RSA *key); 00057 00059 virtual ~SiRSA(); 00060 00070 virtual OFCondition sign( 00071 const unsigned char *inputHash, 00072 unsigned long inputHashSize, 00073 E_MACType inputHashAlgorithm, 00074 unsigned char *outputSignature, 00075 unsigned long &outputSignatureSize); 00076 00087 virtual OFCondition verify( 00088 const unsigned char *inputHash, 00089 unsigned long inputHashSize, 00090 E_MACType inputHashAlgorithm, 00091 const unsigned char *inputSignature, 00092 unsigned long inputSignatureSize, 00093 OFBool &verified); 00094 00102 virtual unsigned long getSize() const; 00103 00107 virtual E_KeyType keyType() const; 00108 00109 private: 00110 00112 SiRSA(SiRSA& arg); 00113 00115 SiRSA& operator=(SiRSA& arg); 00116 00118 RSA *rsa; 00119 00120 }; 00121 00122 #endif 00123 #endif 00124 00125 /* 00126 * $Log: sirsa.h,v $ 00127 * Revision 1.6 2010-10-14 13:17:25 joergr 00128 * Updated copyright header. Added reference to COPYRIGHT file. 00129 * 00130 * Revision 1.5 2005-12-08 16:04:43 meichel 00131 * Changed include path schema for all DCMTK header files 00132 * 00133 * Revision 1.4 2003/06/04 14:21:03 meichel 00134 * Simplified include structure to avoid preprocessor limitation 00135 * (max 32 #if levels) on MSVC5 with STL. 00136 * 00137 * Revision 1.3 2001/09/26 14:30:21 meichel 00138 * Adapted dcmsign to class OFCondition 00139 * 00140 * Revision 1.2 2001/06/01 15:50:50 meichel 00141 * Updated copyright header 00142 * 00143 * Revision 1.1 2000/11/07 16:48:58 meichel 00144 * Initial release of dcmsign module for DICOM Digital Signatures 00145 * 00146 * 00147 */ 00148