I've put a small program together to explore crypto. I can seem to apply crypto but not the reverse. In the attached program press 'Create File' followed by 'Read File' to see the error.
You cannot safely convert an array of bytes to a string. This will only work if the bytes do represent a string. Otherwise some of the data gets lost. For example is there is a 0 bytes in the array the string will be trimmed to this byte.
If you are writing several arrays one after another then you later need a way to separate the arrays when reading. In this case you can write the array size before each array and then when you read the data you first read the length and then know how many bytes you should read.
If you are only writing a single array to a file then it is simpler as you only need to read the whole file.
Whats the syntax for redeclaring the size of an array on the fly after it has been declared in Globals? Ive tried 'Dim buffer(32)' and it don't like it.