QSL4A Documentation of
decryptFileToBytes <QSL4A API Menu>decryptFileToBytes( srcFile )
Decrypt a File to another Bytes,
needs to run droid.cipherInit first , and encodingFormat must omitted .
if you want to operate files in Media Storage Device or /sdcard/Android/data/<packagename> , run droid.documentTreeShowOpen first .
srcFile (String)
return Decrypted Bytes
===== ===== ===== =====
Example :
>>> from androidhelper import *
>>> droid = Android()
>>> droid.cipherInit(b'0987654321fedcba')
Result(id=1, result=None, error=None)
>>> p = '/sdcard/!0/2.enc' # Replace with your encrypted file path
>>> droid.encryptBytesToFile(b'se\x00\xff',p)
Result(id=2, result=None, error=None)
>>> droid.decryptFileToBytes(p)
Result(id=3, result=b'se\x00\xff', error=None)
>>> open(p,'rb').read() # Encryption Result will be different because of Random Initial Vector
b'}\x1c\xa3c\xd4#\xb3j\x95\x11].^\x1e\xc1\xd3'
===== ===== ===== =====