// Mech_RSA_PKCS.h: interface for the CMech_SHA1_RSA_PKCS class.
//
//////////////////////////////////////////////////////////////////////


#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Mech.h"
#include "pkcs11t.h"	// Added by ClassView

class CMech_SHA1_RSA_PKCS : public CMech  
{
public:
	void AddPadding( byteBuffer &data, ulong ulPaddedDataLen );
	void RemovePadding( byteBuffer & message );

	void ConstructData( byteBuffer &data );

	void ConstructDataUpdate( byteBuffer &data );
	void ConstructDataFinal( byteBuffer &signature );

	CK_RV SignInit(CPKCS11Object *pObj11, CK_VOID_PTR pParameter, CK_ULONG ulParameterLen);
	CK_RV SignUpdate(CK_BYTE_PTR pPart, CK_ULONG ulPartLen);
	CK_RV VerifyInit(CPKCS11Object *pObj11, CK_VOID_PTR pParameter, CK_ULONG ulParameterLen);
	CK_RV VerifyUpdate(CK_BYTE_PTR pPart, CK_ULONG ulPartLen);
		
	CMech_SHA1_RSA_PKCS();
	CMech_SHA1_RSA_PKCS(CK_ULONG ulMinKeySize, CK_ULONG ulMaxKeySize, CK_FLAGS flags);
	virtual ~CMech_SHA1_RSA_PKCS();

};
