Pages

Monday, March 10, 2008

test!

Blog added to mxna

Sunday, February 3, 2008

Wednesday, December 12, 2007

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();
passwordBytes.writeUTFBytes("secretPassword");
EncryptedLocalStore.setItem("password", passwordBytes);
// Reading encrypted information
var passwordBytes:ByteArray = EncryptedLocalStore.getItem("password");
var password:String = passwordBytes.readUTFBytes(passwordBytes.length);


details here :
http://weblogs.macromedia.com/cantrell/archives/2007/12/encrypting_data.cfm