Archived Forum Post

Index of archived forum posts

Question:

Only part of decrypted data is returned not all

Sep 12 '12 at 08:26

Hello, I'm having problem when I try to decrypt data contents (string data value) using CHILKATCRYPT2Lib.ChilkatCrypt2 (Rijndael encryption) in VB 6.0 SP6.
I'm getting only first 195 characters decrypted as return value from library.


Parameters are:
Encryption Type: Rijndael
Keysize: 128
Encoding: Base64
Mode: CBC
Key: 717w11qpyP7P446w69yG5968Y751n5I0
IV: vrLUu57Pf22Fy7F0
Contents to decrypt:
KzbxR+/Y6o7AM2l8O18xTLP1GJTx7GeXW5B2cpGLm96Kf/0p4dopJBJyVpaDoK4GgH9BBgrL+5ZdeiLKYPIpt8T1dX6FPSh0ihfdW+XKaUQiSrnUlcOUqt0iy+eUTaBwI94PT8qy57k+/ENzbkIz+N9nmxqesuURn6vNMGlzkwrU2W6dzIDwjGZDjdDUpLZiP6m3XCCGpAdMfnECH1MX5shIuoFF28+bvg2yTEuvI4MHo8iwNmX9GYKlXlUOwt2gxgfwciI7aiC+6JPJMA19EU9N1Y1ySvBT09dF4csdoW3Fh3LMKQZCDBejHeBcgz6L


In VB 6.0 SP6 I get return value(195 characters long string):
---HEADER---
udtype=0
usid=da39a3ee5e6b4b0d3255bfef95601890afd80709
ust=20120912@090654
svt=20120912@090654
fromuser=Bob
touser=Bob
cmd=wshello
udtid=
umsid=
pn=1
pt=1
rc=200
rctext=

With same data and same parameters under PHP 5.x I get right data contents:
---HEADER---
udtype=0
usid=da39a3ee5e6b4b0d3255bfef95601890afd80709
ust=20120912@090654
svt=20120912@090654
fromuser=Bob
touser=Bob
cmd=wshello
udtid=
umsid=
pn=1
pt=1
rc=200
rctext=Ok
---HEADER---
---UDT---
Hello
---UDT---

Please, any suggestions and correction or problem resolving are welcome.

Thanks.


Answer

I discovered hour ago that problem was in setting up right padding method to lib!
Padding should be set to 3, fill zero's. So far, as long as I made tests it's working fine.


Answer

Please provide a code snippet that shows exactly what you are doing.