QSL4A Documentation of encryptStringToFile  <QSL4A API Menu>
encryptStringToFile( srcString, dstFile )
Encrypt a Normal / Base64 String to another File ,
needs to run droid.cipherInit first .
if you want to operate files in Media Storage Device or /sdcard/Android/data/<packagename> , run droid.documentTreeShowOpen first .
srcString (String)
dstFile (String)
return None

===== ===== ===== =====
Example :

>>> from androidhelper import *
>>> droid = Android()
>>> droid.cipherInit('abcdef0123456789','AES/CBC/PKCS5Padding','utf-8')
Result(id=1, result=None, error=None)
>>> p = '/sdcard/!0/2.enc' # Replace with your encrypted file path
>>> droid.encryptStringToFile('你好啊',p)
Result(id=2, result=None, error=None)
>>> droid.decryptFileToString(p)
Result(id=3, result='你好啊', error=None)
>>> bytes('你好啊','utf-8')
b'\xe4\xbd\xa0\xe5\xa5\xbd\xe5\x95\x8a'
>>> open(p,'rb').read() # Encryption Result will be different because of Random Initial Vector
b'[\x9e\xf9\x8c\x9e\xd6\xa4\x19\xfdj\x95\xeb\xa3\x7f\xaa?'
===== ===== ===== =====