I encrypted a JavaScript file as "dimsd.dat" with RandomAccessFile and then decrypted it as "dimsd.js",
Dim raf As RandomAccessFile
Dim raf1 As RandomAccessFile
raf.Initialize(File.DirRootExternal, "dimsd.dat", False)
fileIt = raf.ReadEncryptedObject(password, raf.CurrentPosition)
Log(fileIt)
raf1.Initialize(File.DirRootExternal, "dimsd.js", False)
raf1.WriteObject(fileIt, False, raf1.CurrentPosition)
raf1.Close
while using WriteObject to sdcard it has some extra characters in start of file as follows
original file
function Question (qname, type, qstring, response, comment, corrects,explan,……..}
decrypted file
function Question (qname, type, qstring, response, comment, corrects,explan,……..}
See some junk characters in start of decrypted file .
The Log(fileIt)is true copy but the written file on sdcard has above junk characters.
What can be the issue?
Dim raf As RandomAccessFile
Dim raf1 As RandomAccessFile
raf.Initialize(File.DirRootExternal, "dimsd.dat", False)
fileIt = raf.ReadEncryptedObject(password, raf.CurrentPosition)
Log(fileIt)
raf1.Initialize(File.DirRootExternal, "dimsd.js", False)
raf1.WriteObject(fileIt, False, raf1.CurrentPosition)
raf1.Close
while using WriteObject to sdcard it has some extra characters in start of file as follows
original file
function Question (qname, type, qstring, response, comment, corrects,explan,……..}
decrypted file
function Question (qname, type, qstring, response, comment, corrects,explan,……..}
See some junk characters in start of decrypted file .
The Log(fileIt)is true copy but the written file on sdcard has above junk characters.
What can be the issue?