I Need Help - Having AES Encryption Issues
I am using the Java Binding to connect a Java Middleware Application to Cache. Originally I was using a CacheListOfDataTypes (JAVATYPE = "java.lang.List") object to bring data back. I was tasked with encrypting the data using AES and I was using the AESCBCEncrypt function on the List elements (up to 20k characters for each element) to bring it back before concatenating it on the middleware. This almost worked. Like 95% of the characters were being decrypted correctly but some text was coming back garbled. I couldn't understand how this was happening. I tried to adjust things like the string encoding and such, but to no effect. Does anyone know why this might have happened??
Because of these issues I decided to try a different approach. I now have a %BinaryGlobalStream that I am putting the data in and then I am using the AESCBCEncryptStream function once all the data is in there. Using this method I have achieved a data transfer of a few thousand characters without any data issues. However, when I try to perform the encryption on a larger Stream, it appears to get hung up in the Intersystems encryption functions and I have to kill the process. Is there any limit to the size of stream that can be encrypted? The one I am working on is not even a megabyte.
Thanks for any help that can be offered.