New to encryption

I am rather new to encryption. I have been reading about it for awhile but never had a use for it until now. I decided to go with the Blowfish alorithm and an object oriented version at that. Being new like I said I don't know awhole lot about them but here is what I have so far. I have a MFC program that you can type in. The text can be saved to a file. But when I save it I want to be able to type in a key and encrypt it. Then able to supply that same key when decrypting it. Here is the class interface:

class CBlowFish
{
public:
//Constructor - Initialize the P and S boxes for a given Key
CBlowFish(unsigned char* ucKey, size_t n,
const SBlock& roChain = SBlock(0UL,0UL));
//Resetting the chaining block
void ResetChain();
// Encrypt/Decrypt Buffer in Place
void Encrypt(unsigned char* buf, size_t n, int iMode=ECB);
void Decrypt(unsigned char* buf, size_t n, int iMode=ECB);
// Encrypt/Decrypt from Input Buffer to Output Buffer
void Encrypt(const unsigned char* in, unsigned char* out,
size_t n, int iMode=ECB);
void Decrypt(const unsigned char* in, unsigned char* out,
size_t n, int iMode=ECB);
};

Here is my encryption code is use

//encryption code
UpdateData(TRUE);
char szDataOut[1024];
//Get length to use for padding must be multiple of 8
int nSize = m_szEdit.GetLength();
nSize = 8-(nSize%8)+nSize;

CBlowFish oBlwFsh((unsigned char*)(LPCTSTR)m_szKey, 8);
oBlwFsh.Encrypt((unsigned char*)(LPCTSTR)m_szEdit,
(unsigned char*)szDataOut, 800, CBlowFish::ECB);
m_szEdit = szDataOut;
UpdateData(FALSE);

The problem is when I decrypt my code it only decrypts so many bytes successfully then the rest is still encrypted. One thing I'm not sure of is once I open the file of text and go to decrypt it how do I know what to pass into the Decrypt() method size_t parameter? Is this the problem. I can't figure it out. Thanks in advance.

Jack
[2104 byte] By [left1none] at [2007-11-19 11:09:17]
# 1 Re: New to encryption
hello you can find aid in http://www.developerslatam.com greetings:)
joseronal at 2007-11-10 3:53:28 >