OFFIS DCMTK  Version 3.6.0
sirsa.h
1 /*
2  *
3  * Copyright (C) 1998-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmsign
15  *
16  * Author: Norbert Loxen, Marco Eichelberg
17  *
18  * Purpose:
19  * classes: SiRSA
20  *
21  * Last Update: $Author: joergr $
22  * Update Date: $Date: 2010-10-14 13:17:25 $
23  * CVS/RCS Revision: $Revision: 1.6 $
24  * Status: $State: Exp $
25  *
26  * CVS/RCS Log at end of file
27  *
28  */
29 
30 #ifndef SIRSA_H
31 #define SIRSA_H
32 
33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/dcmsign/sialgo.h"
35 
36 #ifdef WITH_OPENSSL
37 
38 #include "dcmtk/ofstd/oftypes.h"
39 
40 class SiPrivateKey;
41 struct rsa_st;
42 typedef struct rsa_st RSA;
43 
49 class SiRSA : public SiAlgorithm
50 {
51 public:
52 
56  SiRSA(RSA *key);
57 
59  virtual ~SiRSA();
60 
70  virtual OFCondition sign(
71  const unsigned char *inputHash,
72  unsigned long inputHashSize,
73  E_MACType inputHashAlgorithm,
74  unsigned char *outputSignature,
75  unsigned long &outputSignatureSize);
76 
87  virtual OFCondition verify(
88  const unsigned char *inputHash,
89  unsigned long inputHashSize,
90  E_MACType inputHashAlgorithm,
91  const unsigned char *inputSignature,
92  unsigned long inputSignatureSize,
93  OFBool &verified);
94 
102  virtual unsigned long getSize() const;
103 
107  virtual E_KeyType keyType() const;
108 
109 private:
110 
112  SiRSA(SiRSA& arg);
113 
115  SiRSA& operator=(SiRSA& arg);
116 
118  RSA *rsa;
119 
120 };
121 
122 #endif
123 #endif
124 
125 /*
126  * $Log: sirsa.h,v $
127  * Revision 1.6 2010-10-14 13:17:25 joergr
128  * Updated copyright header. Added reference to COPYRIGHT file.
129  *
130  * Revision 1.5 2005-12-08 16:04:43 meichel
131  * Changed include path schema for all DCMTK header files
132  *
133  * Revision 1.4 2003/06/04 14:21:03 meichel
134  * Simplified include structure to avoid preprocessor limitation
135  * (max 32 #if levels) on MSVC5 with STL.
136  *
137  * Revision 1.3 2001/09/26 14:30:21 meichel
138  * Adapted dcmsign to class OFCondition
139  *
140  * Revision 1.2 2001/06/01 15:50:50 meichel
141  * Updated copyright header
142  *
143  * Revision 1.1 2000/11/07 16:48:58 meichel
144  * Initial release of dcmsign module for DICOM Digital Signatures
145  *
146  *
147  */
148 


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2