Secure login using the EncryptedLocalStore in Adobe AIR

Adobe AIR has a quick and safe way to store encrypted user data when building applications. Data such as login and password can be persisted in the application using the EncryptedLocalStore available for AIR applications.

To demonstrate this, I wrote a quick demo application that will store username and password after users login. When the application is launched again, the same username and password will be retrieved from the EncryptedLocalStore and propagate the login and password text boxes. User’s also have the option to reset the data and store a new username and password, removing the stored data from the EcryptedLocalStore.

This can be handy when you want your application to do auto-login, using the existing stored information from the user’s previous session, and of course, the stored data is encrypted.

Example:

[as lang=”ActionScript”]

[/as]

To use the example code, just create a new AIR application in Flex Builder and paste the code into your main MXML file.

-Mister

6 Comments

  1. its really good example,
    could u tell where exactlly the uername and password files are stored on local pc ?

  2. Lar, you mean because, like your code, it had to be fixed to work? Haha. Actually this code is similar to login code that was implemented for the desktop application in the last public release but also borrows from other examples on the web and modified to make a practical login example. Since we often borrow from other examples, it seems fair to give back to the community. Also, we never mention the evil empire on this blog, nobody wants that kind of bad luck!! 🙂

  3. Hi, could you explain please, how i save user and password my air application in your code so for later i typing username, password loading and enter, i try understand where and how save username, password inside code to export for air application for later enter normally using username,password that i save inside code.

    Best,

Comments are closed.