You are assuming that cipher block size is equal to cipher key size,
which is not true in general.
Call the BlockSize() member of the encryptor/decryptor to obtain the
block length.

A much better approach is you let the library do the job by using a
PaddedEncryptor.

There are also better ways to supply the key to the encryptor/decryptor
(i.e. PKCS5).
>From what I see, you seem to consider the password and the key used in
the block cipher the same thing, which is a dangerous thing (even if it
may work in your case).


Yusuf Khan-YUK wrote:
> 
>  am having a problem with AES encryption, decryption using
> crypto++4.2. The decrypted string contains extra characters than the
> input.

-- 
Giuliano Bertoletti
e-Security Manager


Intrinsic - Security Monitoring
http://www.intrinsic.it

COOL-FIRE: la soluzione Firewall per Windows NT/2000
http://www.symbolic.it/Prodotti/cool-fire.html

SYMBOLIC S.p.A. Tel: +39 0521 776180 / Fax: +39 0521 776190

Reply via email to