00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
#ifndef SIRSA_H
00035
#define SIRSA_H
00036
00037
#include "osconfig.h"
00038
#include "sialgo.h"
00039
00040
#ifdef WITH_OPENSSL
00041
00042
#include "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
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146