I wrote a blog post regarding the problem in general:
Title: Encryption Compatibility: Matching Encrypted Output on Different
Systems
URL: http://blog.chilkatsoft.com/?p=123
To sum it up, these input parameters must match between encryptor and
decryptor:
(1) Algorithm
(2) Mode (CBC, ECB)
(3) Key Length (128-bit, 192-bit, 256-bit)
(4) Initialization Vector
(5) Secret Key
(6) Padding Scheme (but only last block will differ if mismatched).
The article discusses each in detail, including character encoding
issues if text is involved.
The intent of the article is that anyone can read it regardless of
programming language
or encryption package/lib to understand the issues involved. I hope
it helps…
-Matt