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

OpenSSLCryptoKeyDSA.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2002-2005 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  * limitations under the License.
00015  */
00016 
00017 /*
00018  * XSEC
00019  *
00020  * OpenSSLCryptoKeyDSA := DSA Keys
00021  *
00022  * Author(s): Berin Lautenbach
00023  *
00024  * $Id: OpenSSLCryptoKeyDSA.hpp,v 1.9 2005/06/04 11:30:26 blautenb Exp $
00025  *
00026  */
00027 
00028 #ifndef OPENSSLCRYPTOKEYDSA_INCLUDE
00029 #define OPENSSLCRYPTOKEYDSA_INCLUDE
00030 
00031 #include <xsec/enc/XSECCryptoKeyDSA.hpp>
00032 
00033 #if defined (HAVE_OPENSSL)
00034 #include <openssl/evp.h>
00035 
00047 class DSIG_EXPORT OpenSSLCryptoKeyDSA : public XSECCryptoKeyDSA {
00048 
00049 public :
00050 
00053     
00054     OpenSSLCryptoKeyDSA();
00055 
00063     virtual ~OpenSSLCryptoKeyDSA();
00064 
00066 
00069 
00077     virtual XSECCryptoKey::KeyType getKeyType();
00078 
00083     virtual const XMLCh * getProviderName() {return DSIGConstants::s_unicodeStrPROVOpenSSL;}
00084 
00089     virtual XSECCryptoKey * clone();
00090 
00092 
00095 
00110     virtual unsigned int signBase64Signature(unsigned char * hashBuf,
00111         unsigned int hashLen,
00112         char * base64SignatureBuf,
00113         unsigned int base64SignatureBufLen);
00114 
00128     virtual bool verifyBase64Signature(unsigned char * hashBuf, 
00129                              unsigned int hashLen,
00130                              char * base64Signature,
00131                              unsigned int sigLen);
00132     
00134 
00142 
00150     virtual void loadPBase64BigNums(const char * b64, unsigned int len);
00151 
00159     virtual void loadQBase64BigNums(const char * b64, unsigned int len);
00160     
00168     virtual void loadGBase64BigNums(const char * b64, unsigned int len);
00169 
00177     virtual void loadYBase64BigNums(const char * b64, unsigned int len);
00178 
00186     virtual void loadJBase64BigNums(const char * b64, unsigned int len);
00187 
00189 
00192 
00200     OpenSSLCryptoKeyDSA(EVP_PKEY *k);
00201 
00203 
00204 
00205 private:
00206 
00207     XSECCryptoKey::KeyType          m_keyType;
00208     DSA                             * mp_dsaKey;
00209     
00210 };
00211 
00212 #endif /* HAVE_OPENSSL */
00213 #endif /* XSECCRYPTOKEYDSA_INCLUDE */

Generated on Sun Jul 3 17:37:26 2005 for XML-Security-C by  doxygen 1.4.2