O'Reilly logo

Adobe AIR 1.5 Cookbook by Koen De Weggheleire, Koen DeWeggheleire, Marco Casario, David Tucker, Rich Tretola

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Encrypted Local Store

Adobe AIR offers several ways to store data locally. You have the legacy option of storing data as a shared object, you can also access the local file system to read and write data, and finally you can write to an embedded SQLite database. When it comes to securing pieces of data like passwords or access keys, your best option is to use the built-in encrypted data store, defined by the EncryptedLocalStore class.

Note

If you need to secure sets of structured data, your best option is to use the embedded SQLite database encryption support covered in Creating an Encrypted Database and Encrypting a Database with a Password.

The data within this store is housed within DPAPI on Windows and within Keychain on Mac OS X using AES-CBC 128-bit encryption.

Once data is written to the encrypted local store, it is accessible only by the application that wrote the data. In addition, the data is stored in a user-specific directory, so each user on the operating system will have a different encrypted local store for the application. For even more restrictive security on data, the encrypted local store also offers an option that ensures that any application attempting to get data from EncryptedLocalStore not only has the correct publisher ID but also has had no changes made to the application directory.

The recipes in this chapter will demonstrate how to store and retrieve data from EncryptedLocalStore.

Storing Data in the Encrypted Local Store

Problem

You would like your ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required