// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Idblockcipherintercept.pas' rev: 10.00

#ifndef IdblockcipherinterceptHPP
#define IdblockcipherinterceptHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Idintercept.hpp>	// Pascal unit
#include <Idexception.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Idblockcipherintercept
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TIdBlockCipherIntercept;
typedef void __fastcall (__closure *TIdBlockCipherInterceptDataEvent)(TIdBlockCipherIntercept* ASender, void * ASrcData, void * ADstData);

class PASCALIMPLEMENTATION TIdBlockCipherIntercept : public Idintercept::TIdConnectionIntercept 
{
	typedef Idintercept::TIdConnectionIntercept inherited;
	
protected:
	int FBlockSize;
	System::TObject* FData;
	Classes::TMemoryStream* FRecvStream;
	Classes::TMemoryStream* FSendStream;
	virtual void __fastcall Decrypt(const void *ASrcData, void *ADstData);
	virtual void __fastcall Encrypt(const void *ASrcData, void *ADstData);
	TIdBlockCipherInterceptDataEvent __fastcall GetOnReceive();
	TIdBlockCipherInterceptDataEvent __fastcall GetOnSend();
	void __fastcall SetOnReceive(const TIdBlockCipherInterceptDataEvent Value);
	void __fastcall SetOnSend(const TIdBlockCipherInterceptDataEvent Value);
	void __fastcall SetBlockSize(const int Value);
	
public:
	__fastcall virtual TIdBlockCipherIntercept(Classes::TComponent* AOwner);
	__fastcall virtual ~TIdBlockCipherIntercept(void);
	virtual void __fastcall Receive(Classes::TStream* ABuffer);
	virtual void __fastcall Send(Classes::TStream* ABuffer);
	void __fastcall CopySettingsFrom(TIdBlockCipherIntercept* ASrcBlockCipherIntercept);
	__property System::TObject* Data = {read=FData, write=FData};
	
__published:
	__property int BlockSize = {read=FBlockSize, write=SetBlockSize, default=16};
	__property TIdBlockCipherInterceptDataEvent OnReceive = {read=GetOnReceive, write=SetOnReceive};
	__property TIdBlockCipherInterceptDataEvent OnSend = {read=GetOnSend, write=SetOnSend};
};


typedef EIdException EIdBlockCipherInterceptException;
;

//-- var, const, procedure ---------------------------------------------------
static const Shortint IdBlockCipherBlockSizeDefault = 0x10;
static const Word IdBlockCipherBlockSizeMax = 0x100;

}	/* namespace Idblockcipherintercept */
using namespace Idblockcipherintercept;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Idblockcipherintercept
