Example: Generating and using an encryption key
This example application demonstrates one technique for generating an encryption key. This application is designed to provide the highest level of privacy and security for users’ data. One important aspect of securing private data is to require the user to enter a password each time the application connects to the database. Consequently, as shown in this example, an application that requires this level of privacy should never directly store the database encryption key.
The application consists of two parts: an ActionScript class that generates an encryption key (the EncryptionKeyGenerator class), and a basic user interface that demonstrates how to use that class. For the complete source code, see Complete example code for generating and using an encryption key.