Thanks for the reply.
Filestream is allowing me to gets the data from the text file, however it seems to be having trouble intrepretting the encrypted characters.
I am using the charCodeAt function to get the ascii characters codes for the encrypted data, however when I run it in debug mode and look at the values it is getting for these characters and then run the (working) c++ decrypter side by side with it to compare the values....they are different.
The "standard" characters remain the same, however the others differ...here is an example:
In C++ program it is read as: -2
In Air program it is reas as: 245
Hopefully this is something simple that I am doing wrong and someone has seen it before...
Thanks a lot,
It is hard to say what is wrong without seeing your code, but here are a couple of things you could try:
1) Ideally you could just pass the bytes to your decryption code instead of having to convert them to characters. The decryption algorithm should be converting whatever characters you pass in to bytes anyway.
2) You could try using the readUTFBytes function on the FileStream object. This will return a string for you so you don't have to worry about converting the bytes that you read in. This will only work if the bytes were outputted in the same UTF-8 encoding.
If I subtract 256 from any value AIR is getting that is greater than 128, I get the correct value (corresponding with the C++ code).
This is probably the solution, but do you know what would cause this?
C++ is using an unsigned char...I'm not sure how that effects it.