Main Page | Modules | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

XSECCryptoProvider.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2002-2004 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * imitations under the License.
00015  */
00016 
00017 /*
00018  * XSEC
00019  *
00020  * XSECCryptoProvider := Base virtual class to define a crpyto module
00021  *
00022  * Author(s): Berin Lautenbach
00023  *
00024  * $Id: XSECCryptoProvider.hpp,v 1.14 2004/02/16 11:30:02 blautenb Exp $
00025  *
00026  */
00027 
00028 #ifndef XSECCRYPTOPROVIDER_INCLUDE
00029 #define XSECCRYPTOPROVIDER_INCLUDE
00030 
00031 #include <xsec/framework/XSECDefs.hpp>
00032 #include <xsec/enc/XSECCryptoHash.hpp>
00033 #include <xsec/enc/XSECCryptoBase64.hpp>
00034 #include <xsec/enc/XSECCryptoX509.hpp>
00035 #include <xsec/enc/XSECCryptoKeyDSA.hpp>
00036 #include <xsec/enc/XSECCryptoKeyRSA.hpp>
00037 #include <xsec/enc/XSECCryptoSymmetricKey.hpp>
00038 
00104 // Some constants
00105 
00116 #define CRYPTO_MAX_HASH_SIZE        128
00117 
00122 #define CRYPTO_OID_DSA              "1.2.840.10040.4.1"
00123 
00135 class DSIG_EXPORT XSECCryptoProvider {
00136 
00137 
00138 public :
00139 
00142     
00143     XSECCryptoProvider() {};
00144     virtual ~XSECCryptoProvider() {};
00146 
00147 
00150 
00161     virtual XSECCryptoHash          * hashSHA1() = 0;
00162 
00174     virtual XSECCryptoHash          * hashHMACSHA1() = 0;
00175 
00186     virtual XSECCryptoHash          * hashMD5() = 0;
00187 
00204     virtual XSECCryptoHash          * hashHMACMD5() = 0;
00205 
00207 
00210 
00220     virtual XSECCryptoBase64        * base64() = 0;
00221 
00223 
00226 
00236     virtual XSECCryptoKeyDSA        * keyDSA() = 0;
00237 
00247     virtual XSECCryptoKeyRSA        * keyRSA() = 0;
00248 
00259     virtual XSECCryptoX509          * X509() = 0;
00260 
00268     virtual bool algorithmSupported(XSECCryptoSymmetricKey::SymmetricKeyType alg) = 0;
00269 
00280     virtual XSECCryptoSymmetricKey  * keySymmetric(XSECCryptoSymmetricKey::SymmetricKeyType alg) = 0;
00281 
00294     virtual unsigned int getRandom(unsigned char * buffer, unsigned int numOctets) = 0;
00295 
00297 
00300 
00305     virtual const XMLCh * getProviderName() = 0;
00306 
00308 
00309     /*\@}*/
00310 };
00311 
00312 
00313 #endif /* XSECCRYPTOPROVIDER_INCLUDE */

Generated on Sun Mar 14 21:35:33 2004 for XML-Security-C by doxygen 1.3.2