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

NSSCryptoKeyHMAC.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 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  * NSSCryptoKeyHMAC := HMAC Keys
00021  *
00022  * Author(s): Milan Tomic
00023  *
00024  */
00025 
00026 #ifndef NSSCRYPTOKEYHMAC_INCLUDE
00027 #define NSSCRYPTOKEYHMAC_INCLUDE
00028 
00029 #include <xsec/enc/XSECCryptoKeyHMAC.hpp>
00030 
00031 #if defined (HAVE_NSS)
00032 
00033 #include "nss/pk11func.h"
00034 #include "nss/nss.h"
00035 
00046 class DSIG_EXPORT NSSCryptoKeyHMAC : public XSECCryptoKeyHMAC {
00047 
00048 public :
00049 
00057     NSSCryptoKeyHMAC();
00058     
00059     virtual ~NSSCryptoKeyHMAC() {};
00060 
00062 
00065 
00073     virtual XSECCryptoKey::KeyType getKeyType() {return KEY_HMAC;}
00074     
00079     virtual XSECCryptoKey * clone();
00080 
00085     virtual const XMLCh * getProviderName() {return DSIGConstants::s_unicodeStrPROVNSS;}
00086 
00088 
00091 
00104     virtual void setKey(unsigned char * inBuf, unsigned int inLength);
00105 
00116     virtual unsigned int getKey(safeBuffer &outBuf);
00117 
00119 
00120 private:
00121 
00122     safeBuffer          m_keyBuf;
00123     unsigned int        m_keyLen;
00124 
00125 };
00126 
00127 #endif /* HAVE_NSS */
00128 #endif /* NSSCRYPTOKEYHMAC_INCLUDE */

Generated on Sun Jan 28 19:37:22 2007 for XML-Security-C by  doxygen 1.4.2