Chapter 9. Adobe AIR Security
Security in any environment is always a just concern. As platforms expand and the general technology landscape shifts, new problems will crop up that require attention and additional mechanisms will be put into place in order to harden platform defenses. AIR 3 includes a number of new and updated security mechanisms, including new APIs for secure data generation along with expanded runtime support for streaming protected video for desktop and mobile.
Encrypted Local Storage (Mobile)
Encrypted local storage (ELS) has been available on the desktop in AIR from the first release, but has not been available for use with mobile platforms. With AIR 3, we can now leverage the
flash.data.EncryptedLocalStore class on mobile devices as well.
On Android, the data is protected by Android's user ID-based file system security.
EncryptedLocalStore on a mobile device, we will first check and see whether it is supported by checking against the
EncryptedLocalStore.isSupported Boolean property. If this returns
true, we can then perform both
EncryptedLocalStore.getItem() commands within our application.
To set items to the ELS using
EncryptedLocalStore.setItem(), we must pass in at least two arguments: a name to identify the data, and the data itself. The data will need to be encoded into a
ByteArray before it is set to the ELS through
EncryptedLocalStore.getItem(). To retrieve the data, we simply pass in the name that we had given ...