flash.data.EncryptedLocalStore class
puede servirte , pero si deseas una conexion socket encriptada en su totalidad tendras que esperar a air 2.0.
aquii te dejo un aparte de un libro; adobe air in action.
All data written to a secure data storage area using EncryptedLocalStore is
encrypted using AES-CBC 128-bit encryption. Again, EncryptedLocalStore takes care
of the encryption and decryption. All you need to do is call the correct methods and
pass them the correct parameters. We’ll look at these methods in a moment. First we
need to look at how the data is stored.
Each piece of data in the encrypted data storage area is identified by a unique key.
The key is a string that we can use to retrieve the data. For example, if you want to
store an email server password, it might make sense to use a key such as emailServer-
Password. The keys you use are arbitrary, but it’s usually a good idea to use names that
clearly indicate what the value is. Each key points to a piece of data that you store
using EncryptedLocalStore, and that piece of data is stored as a flash.utils.Byte-
Array object. If you’re not familiar with the ByteArray class, there’s no reason to
panic. It implements the IDataInput and IDataOutput interfaces—the same inter-
faces implemented by FileStream. That means you can write and read data to and
from a ByteArray object just as you would a FileStream object. For example, the fol-
lowing code constructs a ByteArray object and then writes an array of strings to it
using the writeObject() method:
var array:Array = new Array("a", "b", "c", "d");
var byteArray:ByteArray = new ByteArray();
byteArray.writeObject(array);
When you want to write data to the data store, all you need to do is call the static
EncryptedLocalStore.setItem() method. The staticItem() method requires that
you give it two pieces of information: the key and the data (in the form of a ByteArray
object). The following example writes a password value using setItem():
var byteArray:ByteArray = new ByteArray();
byteArray.writeUTFBytes("j8ml08*1");
EncryptedLocalStore.setItem("emailServerPassword", byteArray);
Once you’ve written data to the data store, it’s likely that at another time you’ll want
to retrieve that data. You can do that using the getItem() method. The getItem()
method requires that you tell it the key of the data you want to retrieve. It then
returns a ByteArray object with the data. The following example retrieves the email
server password:
var byteArray:ByteArray =
➥EncryptedLocalStore.getItem("emailServerPassword");
var password:String= byteArray.readUTFBytes(byteArray.length);
What if you want to remove data from the data store? Not a problem. Encrypted-
LocalStore provides two static methods for accomplishing that: removeItem() and
reset(). The removeItem() method removes an item given the key. For example, the
following will remove the email server password from the data store:
EncryptedLocalStore.removeItem("emailServerPassword");
The reset() method removes all data from the data store:
EncryptedLocalStore.reset();
We’ve wrapped up all the core theoretical information, so we have just one more
thing to do in this chapter, which is to add to our AirTube application by integrating
some of the file system knowledge we just learned.
tambien tenemos esta componente
http://ascrypt3.riaforge.org/ tiene ejemplor claros. espero que te sirva
saludos.