63 lines
2.1 KiB
C++
63 lines
2.1 KiB
C++
/***********************************************************************
|
|
*
|
|
* Copyright (C) 2005-2006 Novell, Inc. All Rights Reserved.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; version 2.1
|
|
* of the License.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, Novell, Inc.
|
|
*
|
|
* To contact Novell about this file by physical or electronic mail,
|
|
* you may find current contact information at www.novell.com.
|
|
*
|
|
***********************************************************************/
|
|
|
|
|
|
#ifndef __FPM_CRYPT_MANAGER_H__
|
|
#define __FPM_CRYPT_MANAGER_H__
|
|
|
|
#include "FirefoxPasswordManager.h"
|
|
#include "Common.h"
|
|
|
|
|
|
class CryptManager
|
|
{
|
|
|
|
//PK11_SetPasswordFunc PK11SetPasswordFunc;
|
|
PK11_GetInternalKeySlot PK11GetInternalKeySlot;
|
|
PK11_FreeSlot PK11FreeSlot;
|
|
PK11_Authenticate PK11Authenticate;
|
|
PK11_CheckUserPassword PK11CheckUserPassword;
|
|
PK11SDR_Decrypt PK11SDRDecrypt;
|
|
PK11SDR_Encrypt PK11SDREncrypt;
|
|
|
|
PL_Base64Encode PLBase64Encode;
|
|
PL_Base64Decode PLBase64Decode;
|
|
|
|
public:
|
|
|
|
int DecryptString(char *cryptData, char **clearData);
|
|
int EncryptString (char *clearData, char **finalData) ;
|
|
int CryptBase64Decode(char *cryptData, char **decodeData, int *decodeLen);
|
|
int CryptBase64Encode(char *cryptData, int cryptDataLen, char **encodeData);
|
|
int CryptPK11DecryptString(char *decodeData, int decodeLen, char **clearData, int *finalLen);
|
|
int CryptPK11EncryptString(char *clearData, int clearDataLen, char **cryptData, int *cryptDataLen);
|
|
|
|
void SetupFunctions(void *funList[]);
|
|
int GetEncryptionPref();
|
|
|
|
};
|
|
|
|
|
|
#endif
|
|
|
|
|