I already posted this as a bug, but if anyone has any other suggestions:
There seems to be an issue with SymmetricDecrypt not returning the full decrypted message.
Given the following values -- these are all hex values:
encrypted data: 158ABE1495B20262E8779930863C211BF6EF8170285BDBF7E5E7E435E08929CE
IV: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Key: abcdef0123456789abcdef0123456789
OperationModeCBC!
PKCSPadding!
SymmetricDecrypt returns: 3~7~618~2~Limit
For converting the above into blobs, I used the CoderObject to HEXDECODE the above "string" values... The encrypted data I already had as a blob; the hex data string is a hex representation of the data received so you can test the following:
However, if I go to http://symmetric-ciphers.online-domain-tools.com/ and plug in those values, the full message is actually:
33 7e 37 7e 36 31 38 7e 32 7e 4c 69 6d 69 74 20
20 20 20 20 20 20 20 20 31 34 39 2e 30 30 7e 00
3~7 ~618~2~Limit 149.00~
... So, for whatever reason, SymmetricDecrypt fails to return the second block.
blob lblb_key, lblb_iv, lblb_data, lblb_test
string ls_return
CoderObject lnv_CoderObject
lnv_CoderObject = Create CoderObject
CrypterObject lnv_CrypterObject
lnv_CrypterObject = Create CrypterObject
lblb_key = lnv_CoderObject.HexDecode('abcdef0123456789abcdef0123456789')
lblb_iv = lnv_CoderObject.HexDecode('00000000000000000000000000000000')
lblb_data = lnv_CoderObject.HexDecode('158ABE1495B20262E8779930863C211BF6EF8170285BDBF7E5E7E435E08929CE')
lblb_test = lnv_CrypterObject.SymmetricDecrypt(AES!, lblb_data, lblb_key, OperationModeCBC!, lblb_iv, PKCSPadding!)
ls_return = string(lblb_test, EncodingANSI!)
Return ls_return
So I think it is something wrong with your code or your data.
If I encrypt
337e377e3631387e327e4c696d69742020202020202020203134392e30307e00
with your key and iv I get
0F4D51509E1145303F2163C2B312F904E7A85DEA14810E9EBF7513ACD5E888E04576A65963CDD30BFB22C4FAF2812582
This I can successfully decrypt.