Thursday, December 6, 2007

Encrypting Data in AIR

In my current AIR project...I have used MD% algorithm to store the password in encrypted format(which is nothing else but a plain text)..and I every time the application starts I read the textfile ......

But just now read about Encrypting Data in AIR
Now thinking why the heck I used so much encryption and decryption :( when there was something like data Encryption was already available.

// Writing encrypted information
var passwordBytes:ByteArray = new ByteArray();
EncryptedLocalStore.setItem("password", passwordBytes);
// Reading encrypted information
var passwordBytes:ByteArray = EncryptedLocalStore.getItem("password");
var password:String = passwordBytes.readUTFBytes(passwordBytes.length);

details here :

No comments: