QSL4A Documentation of
encryptBytes <QSL4A API Menu>encryptBytes( srcBytes )
Encrypt a Bytes to another Bytes ,
needs to run droid.cipherInit first , and encodingFormat must omitted .
srcBytes (Bytes)
return Encrypted Bytes
===== ===== ===== =====
Example :
>>> from androidhelper import *
>>> droid = Android()
>>> droid.cipherInit(b'0123456789abcdef')
Result(id=1, result=None, error=None)
>>> a = droid.encryptBytes(b'AsDf\x00')
>>> a # Encryption Result will be different because of Random Initial Vector
Result(id=2, result=b'\xd8\\\xcaH\xe4\x0fPa\xd5\xf6\xb1G\xa0\xbd\x0cF', error=None)
>>> b = droid.decryptBytes(a.result)
>>> b
Result(id=3, result=b'AsDf\x00', error=None)
===== ===== ===== =====