EncryptedLocalStore and applicationDirectory in AIR

The EncryptedLocalStore class provides methods for setting and getting objects in the encrypted local data store for an AIR application. And the encrypted files are put in a subdirectory of the user’s application data directory; the subdirectory path is Adobe/AIR/ELS/appFolder. The appFolder equals to the applicationID  that you wrote in application description xml (xxx-app.xml) when the application is not signed by any valid certificate.   If the AIR application is signed by a valid certificate,  the appFolder should look like ApplicationID.19863E06A76A…B73154839644F.1. The hex string followed the ApplicationID must be the hashed value of all the files in application directory when it was signed. The AIR application will hash their application directory when it starts up and check it with the original one. If it was not matched, the application’s Encrypted Local Store directory will be set to Adobe/AIR/ELS/ApplicationID. Therefore, the data stored in Encrypted Local Store directory seems lost from application view. The AIR application can’t read the data that it stored before. The result looks like below:


Figure 1. Normal

Figure2. Something Changes in Application Directory

When will this situation happen?
If  any modification was done at the files under application directory, the Encrypted Local Store directory will be change. The information you stored in Encrypted Local Store class will be no longer available.

What should we do?
Don’t write anything into application directory. Be careful when you are operating on File.applicationDirectory. Or never sign your application :) .

This entry was posted on Monday, April 19th, 2010 at 5:25 pm and is filed under flex air flash. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Post a Comment



To submit your comment, click the image below where it asks you to... Clickcha - The One-click Captcha