I would like to decrypt a file . ReadEncryptedObject return a object (indeed) but WriteObject don't ...
B4X:
Dim input As RandomAccessFile
Dim output As RandomAccessFile
input.Initialize(File.DirRootExternal, "from-crypt.db", True)
output.Initialize(File.DirDefaultExternal, "normal.db", False)
output.WriteObject(input.ReadEncryptedObject("B4Apassword", input.CurrentPosition), False, 0)
output.Close
My guess is that RandomAccessFile uses buffering so what you are doing will not work. You need to split it out so you read the file in and then write it. Because the buffer will not be flushed until you call the close method.