EncryptedLocalStore in android

Hello everyone,
I recently installed Flash Builder 4 Burrito, in order to develop a mobile application in AIR, but I'm getting trouble in encrypting an sqlite database using this open source library: https://github.com/mikechambers/as3corelib, the EncryptionKeyGenerator object to be more precise.
The code I'm using is this:
import flash.utils.ByteArray;
import com.adobe.air.crypto.EncryptionKeyGenerator;
protected var password:String = "MyStrongPassword";
protected var passwordInBytes:ByteArray = new ByteArray();
protected var keyGenerator:EncryptionKeyGenerator = new EncryptionKeyGenerator();
protected var connection:SQLConnection = new SQLConnection();
protected function init(event:Event):void {               
     if (connection.connected == false) {
          var file:File = File.applicationStorageDirectory.resolvePath("myDB.db");
          connection.addEventListener(SQLEvent.OPEN, onOpen);
          connection.addEventListener(SQLErrorEvent.ERROR, onError);
          passwordInBytes = keyGenerator.getEncryptionKey(password);
          connection.openAsync(file, "create", null, false, 1024, passwordInBytes);
protected function onOpen(event:Event):void {
     trace("Opened successfully");
protected function onError(event:Event):void {
     trace("Couldn't open");
The trouble here is that I'm getting an error stating "EncryptedLocalStore is not supported on the current platform", pointing to the line that says " passwordInBytes = keyGenerator.getEncryptionKey(password);". Does android doesn't really support EncryptedLocalStore (I'm not even using it)? Or is it another error? How would anyone develop apps for android without being able to store encrypted data?

"AIR profile support: This feature is supported on all desktop operating systems, but is not supported on mobile devices or AIR for TV devices. You can test for support at run time using the EncryptedLocalStore.isSupported property. See AIR Profile Support for more information regarding API support across multiple profiles." Livedocs.
I debugged into the source of library you mentioned.
It does something like
var salt:ByteArray = EncryptedLocalStore.getItem(saltKey);
if (salt == null)
     salt = makeSalt();
     EncryptedLocalStore.setItem(saltKey, salt);
So, salt is how you key is made more secure. Your given key is appended with salt (Another string) and then Bitwise Opeartions are done on combined key.
The library stores this key in ELS with the key "com.adobe.air.crypto::EncryptedDBSalt$$$" by default.
Following is the function that is used to generate salt.
private function makeSalt():ByteArray
     var result:ByteArray = new ByteArray;
     for (var i:uint = 0; i < 8; i++)
          result.writeUnsignedInt(Math.round(Math.random() * uint.MAX_VALUE));
     return result;
So now you know what this Library does. (keyGenerator.getEncryptionKey(password);)
1. Optionally validate for strongness.
2. repeate the password to make the lenghth 32 "saumitrabhave" will become "saumitrabhavesaumitrabhavesaumit"(commentedpwd)
3. Generate salt and store it in ELS.
4. XOR commentedpwd and salt
5 etc
6. etc
So you might want to remove ELS.getItem and ELS.setItem calls before you can use this library.
Or
Not to use library at all develop a secure way of yours based on the steps decribed.
So, You can encrypt sqlDB, But you can't use ELS.

Similar Messages

  • Air mobile encryptedlocalstore not working at android

    hi,
    i have a problem in my mobile application
    i use encryptedlocalstore to store user id and password and packaged apk with captive-runtime
    but some device without adobe air, store and get data with encrypedlocalstore not working
    when i install adobe air at this device, encryptedlocalstore working.
    it bug with packing apk captive-runtime?
    i use flash builder 4.6 and air sdk 3.1

    Just check the reviews on the Google Play store. Tons of people reporting probelms with the update to Android 5.0
    Tye Bandy February 11, 2015
    Remote doesn't work No longer has remote feature after Lollipop update to Galaxy S5
    Mike de Gouveia February 8, 2015 
    Not compatible with Android L This was an OK app before I updated my S5 to lollipop. It was a bit glitchy with scheduling recordings and scrolling through TV listings before, but now it is just terrible and does not even allow me to use the app as a remote control and is always crashing. I'm keeping the app because I'm hopeful that they will resolve the compatibility issues because it is pretty convenient having an app running off the WiFi to control the DVR. I will submit a new review once they do.
    Robert DeNuto February 9, 2015
    "restore to factory settings and try again." I contacted FiOS support because after updating my S5 to Lollipop, the app would no longer recognize that I was connected to my FiOS router. As a result, I couldn't change the channels on my FiOS set top box or watch FiOS programs on my phone
    Juston Ling
    Please fix the Lollipop S5 issue The remote portion is the only reason to have this app, and since it had been rendered useless ever since Lollipop was pushed - I have to rate 1 star. Once fixed I will gladly update
    Len S. February 12, 2015
    Remote don't work on App

  • How reliable is the persistency of the EncryptedLocalStore in the current version of AIR?

    I've seen a lot of posts dating back from 2010 to 2012 where Adobe indicates one should not rely on the EncryptedLocalStore for keeping persistent data. They have indicated they will be making improvements, however I don't see any new information about it. I'm looking to keep persistent data on multiple platforms including Android, Windows, and Mac OS.
    Older post about reliability: http://blogs.adobe.com/flashplayer/2012/09/air3-4els.html
    - Greg

    Hi,
    P1_ITEM will not storing session state,
    because you did create it to page and it not exists in Apex tables where all items information is stored.
    And you can not use that item in e.g. page process.
    Br,Jari

  • How do i use my web of trust add on firefox android?

    how do i use my web of trust add on firefox android?
    i have it in my PC and it works great, all i do is look at the green circles to tjw right of each website in my search lists.
    but i do not see anything like this on my android! how do i work it?
    thanks!

    Yes, I clicked on your link, but it took me to a foreign language (i assume Italian or such) page. Then I backspaced to type in just the add-ons for android, and searched for web of trust, then WOT. But i still cannot find my answer! Are you able to just TELL me how to use/see/ bring up this WOT app in my FF android? Thanks!

  • Excite PRO 3G connection not work after Android v4.3 update

    Hello,
    I live in Italy and on last Sunday (january 26th) my Excite PRO tablet (model AT10LE-A-10H) got the Android version 4.3.201121220.35.
    After restart my wifi works fine, all other app work fine, but my 3g connection doesn't work, mobile network bar is empty and it says "no service".
    My sim card is ok. I used this sim card before the system update and I didn't get any problem with Android 4.2.2.
    Please help me.
    Thank you

    >After restart my wifi works fine, all other app work fine, but my 3g connection doesn't work, mobile network bar is empty and it says "no service".
    Go to the mobile network settings and search again for the 3G network.
    I had similar problem with my Android Smartphone and my o2 provider
    I started new search, then I chosen the O2 again and then I could solve the problem.
    In case this does not work for you, recommend you to reset the tablet back to default (factory settings)

  • For what reason on my tablet with OS Android 4.1 does not work flash on the sites?

    Hi! I recently bought a Google Nexus 7 tablet with Android 4.1 operating system and on my tablet does not work flash sites. Why adobe does not release a new version of flash for android 4.1? Why it was necessary to buy a company Macromedia, if adobe does not want to develop web technology? I think against Adobe can sue for violation of antitrust

    I found this for example:
    http://www.slashgear.com/adobe-no-jelly-bean-flash-flash-player-pulled-altogether-august-1 5-29236404/

  • Why does Android Reader smart zoom not work as described on Google Nexus 7 2013 tablet?

    The smart zoom feature in Android Acrobat Reader allows you to double tap on a text column and the reader will zoom up to the column in improve readability.  This feature works great on the Samsung Galaxy Note 2 smart phone, but only appears to zoom half way on the Google Nexus 7 2013 tablet.
    Is this a bug?
    Thanks in advance for your replies.
    Regards,
    Jim Savitz

    Would it be possible for you to share the problematic pdf and OS information  with us at [email protected] so that we may investigate?
    Thanks,
    Adobe Reader Team

  • How to make mac address gmail contacts overwrite the ones on my HTC Android phone - I don't want to sync - that makes the phone scramble and overwrite my computer.  I want to remove or correctly overwrite the phone information as I have done with iPad.

    Please help - I am beginning to hate google, my android and gmail.  I have just wasted about 5 hours in a futile attempt to try and get my current Mac contacts list on my computer updated to my phone. I'm not that computer literate but I have looked up about google phone accounts, vCards, backing up contact lists, what SD on phones are, and God know what else.  I have searched the internet and tried all sorts of things and I still have a mac with a now correct contact list (after the iPad contacts scrambled it and I spent ages manually correcting them all) and a phone with an outdated contact list.  If you try and sync them the phone wants to overwrite the computer one just like the iPad did (would it be so **** hard to give you a choice on the phone as to which overwrites which!).  After all the  advice on the internet failed, I got the bright idea to completely delete all the ones on the phone and if it was empty of contacts the computer one could be exported to it.  Not as simple as it sounds.  First I backed up (I think) my computer contacts list. Numerous futile attempts to go through the phone options to globally delete all contacts did not work - they gave a warning message and you got to choose whether to continue or not, I did, and it looked like it might be working as it changed to zero data on the phone, but then they all popped back up again from God knows where from, but without their little added bits like pictures of the people.  So, I tried un- syncing the darn phone from  google and then deleting them globally.  That didn't work either.  I tried deleting them  all again and again and google would crash and not let me do it. It is absolutely ridiculous that this is so damned difficult to do (especially if you are not computer savvy) and that you cannot choose which device overwrites which when syncing. I gave up and ticked sync with Google again (not that it appears to do anything to the phone contact list at all).  So after 5 hours I am back to where I started from, with a phone showing all the same  incorrect contacts (but the pictures are back), which wants to overwrite the computer if I try any sort of sync, and no way to fix them except go into each one manually and try and do it - and how long would that take (and I've already wasted hours and hours fixing scrambled contact lists!).  I think I will do a print out of the computer contact list and just carry it around with me like an address book - so much bloody simpler.  So now I have a headache, am fighting an overwhelming urge to hurl the phone at the wall,  hoping for a heat wave to evaporate icloud things and am wishing I had bought an iPhone instead of the stupid HTC Android.  Can any one offer me any suggestions on how to get rid of the contacts on my phone and replace them with the ones in my mac address list - hopefully after that  they can sync to their hearts content and not stuff everything up again (which was why I unsynced google a while back - because the phone's list kept making stuff ups and scrambling and duplicating my computer contacts list).  Am I the only one on the planet having this problem or is there someone else out there who has had it and solved it.

    Without "pretending" to be yourself on the other phone (change settings) there's nothing else you can do.
    iOS devices are meant to be single user and can't view iCloud.com the same way a Mac or PC can do.
    You need to find a desktop or laptop machine (Mac or PC) to log in at iCloud.

  • HT201269 How do I add another contact / recipient to an SMS. Easy in Android, but I can't see how on my 5s.  Have to create a group on my Macbook Pro (OS 9.1), but it's not getting synced via usb. I'd prefer not to use cloud.

    How do I add a contact / recipient to an SMS on iPhone 5s?  It's easy on Android, but I've not sussed it on the iPhone - can't create a group etc.  Tried to create a group on Mac, but it either doesn't exist or won't sync to the phone with usb, nor will other contact details created on Mac.  I'd rather not use the cloud.  I'm sure contacts used to sync to my old iPod touch in Snow Leopard.
    Is it not more logical to have the phone as the main source of this sort of data?  We're more likely to update on a device we carry all the time surely?
    Please advise. Thank you

    Hey Cornish wrinkly,
    It sounds like you want to create a group message. You can read about group messaging on the iPhone here:
    iOS: Understanding group messaging
    http://support.apple.com/kb/HT5760
    Welcome to Apple Support Communities!
    Regards,
    Delgadoh

  • HT5012 I am having difficulty XMIT/REC text messages to family members using Android phones?  I have a 3GB data plan and all switches and buttons are set properly.  Any suggestions?

    I am having difficulty XMIT/REC text messages to family members using Android phones?  I have a 3GB data plan and all switches and buttons are set properly.  Any suggestions?

        Hello APVzW, we absolutely want the best path to resolution. My apologies for multiple attempts of replacing the device. We'd like to verify the order information and see if we can locate the tracking number. Please send a direct message with the order number so we can dive deeper. Here's steps to send a direct message: http://vz.to/1b8XnPy We look forward to hearing from you soon.
    WiltonA_VZW
    VZW Support
    Follow us on twitter @VZWSupport

  • How to get Current Location in a Android Emulator using Flex

    Hi
    In the following code I am able to plot the Location using Latitude and Longitude but the requirement is
    in an Android Emulator on launch of the application I need google map to display the users current location,
    How can this be achieved ??? I tried to get the Latitude and Longitude of the current position using
    geoLocation class by I am not able to get that working,
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" title="Home">
        <s:layout>
            <s:VerticalLayout />
        </s:layout>
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import com.google.maps.LatLng;
                import com.google.maps.MapEvent;
                import com.google.maps.MapType;
                import com.google.maps.controls.PositionControl;
                import com.google.maps.controls.ZoomControl;
                import flash.sensors.Geolocation;
                private var myGeo:Geolocation;
                protected function showBtn_clickHandler(event:MouseEvent):void
                    if(Geolocation.isSupported == 'true')
                        myGeo = new Geolocation();
                        myGeo.setRequestedUpdateInterval(100);
                        myGeo.addEventListener(GeolocationEvent.UPDATE, onUpdate);
                    else
                        myTextArea.text = "Device Not Supported";
                private function onUpdate(event:GeolocationEvent):void
                    myTextArea.text += "Hi"+ "/n"+ event.latitude.toString() + "/n" +
                        event.longitude.toString();
                protected function myMap_mapevent_mapreadyHandler(event:MapEvent):void
                    myMap.setCenter(new LatLng(24,58),9,MapType.NORMAL_MAP_TYPE);
                    myMap.addControl(new ZoomControl);
                    myMap.addControl(new PositionControl);
            ]]>
        </fx:Script>
        <s:Button id="showBtn" label="Show" click="showBtn_clickHandler(event)"/>
        <s:TextArea id="myTextArea" width="100%" height="50%" />
        <maps:Map id="myMap" width="100%" height="50%"
                  xmlns:maps="com.google.maps.*"
                  sensor="true"
                  key="ABQIAAAA2Fwy6HLBheYSAWRBEZKwEhRLum8XdHegG17d4EymNgK0o7h2qRRWVBVQywiGHEiGtKahjfGW8xxc RA"
                  mapevent_mapready="myMap_mapevent_mapreadyHandler(event)"
                  url="http://www.xyz.com"/>
    </s:View>

    Geolocation isn't supported in the Emulator. You'll have to set up a test case that gives the geolocation without relying on the Emulator.

  • Is there a way to open different books on various apps at the same time like in android devices?

    hello good peolpe, i bought an ipad mini retina for books reading and i would like to know if there is a way i can open a book with different apps like  i do on android device where you can use various apps to open differents books at the same time, i would like to also know if there is a way to do the same thing but with power point and word files, and how can i open them on my ipad and transfer them, thanks every one for their time

    Currently you can't. Maybe in iOS 8 that will be released soon.
     Cheers, Tom

  • How easy is it to create a new add on? I would like to see tabbed display within the browser on FF24 on Android 4.2 – as per desktop FF

    Please excuse this if it's a noob Q – I am, indeed, completely new to Android. Tabbed display appears to have been possible on previous versions of FF for Android via several add ons but unfortunately no more. Display of each open tab within the browser – rather than the current arrangement with just the number in the corner – is still possible with FF desktop and also features in Chrome, Opera and Dolphin for Android. I would prefer not to use these other mobile browsers as FF outperforms them but I do need tabbed display to allow for PDF docs to open – using the PDF viewer add on – alongside their initiating webpage. Any ideas? Is it difficult to create an add on? What is the process? Is one in the pipeline? Many thanks in advance for any help or guidance you can offer...

    Many thanks for your reply, Waka – guess you're right that it's a new add on or bust... I still find it odd that such a common UI feature across mobile browsers is unavailable in FF24 either as an option under settings or as an add-on. Surely, I'm not the only person who finds this puzzling?

  • Lync 2013 + Windows 8 phones not getting any notification but android and iphone works fine

    Dear All,
    Issue : None of the windows 8 phones gets alert when someone pings in lync2013
    Description: We get notification when someone pings to lync2013 im configured in android or iphone and it fails to notify when someone pings lync2013 configured in windows phones Example : Lumia 920,930,625
    Environment:
    Singe FE and Edge
    Assessments:
    Push notification is enabled in the server side and on mobile
    Tried using 2010 version client had the same issue
    Push testing was successful until I updated the server and now after update I am getting the following error
    PS C:\Users\administrator.tester> Test-CsFederatedPartner -Domain push.lync.com -ProxyFqdn sipfed.online.lync.com -verbos
    e
    cmdlet Test-CsFederatedPartner at command pipeline position 1
    Supply values for the following parameters:
    TargetFqdn: edge.tester.com
    VERBOSE: Reading access proxy port from topology process started.
    VERBOSE: Reading access proxy port '5061' from topology process successfully finished.
    VERBOSE: Reading certificate process started.
    VERBOSE: Reading certificate process successfully finished.
    VERBOSE: Searching for certificate with issuer name = 'CN=test-certsrv-CA, DC=tester, DC=com' and serial number =
    '4200000013a701fa4732b0475b000000000013'.
    VERBOSE: Successfully found certificate with the matching issuer name and serial number.
    VERBOSE: Workflow Instance Id 'd283786a-ba07-42ad-83e2-ad4ed5692597', started.
    VERBOSE: Command line executed is 'Test-CsFederatedPartner -Domain push.lync.com -ProxyFqdn sipfed.online.lync.com
    -verbose'.
    Test-CsFederatedPartner : A 500 (The server encountered an unexpected internal error) response was received from the
    network and the operation failed. See the exception details for more information.
    At line:1 char:1
    + Test-CsFederatedPartner -Domain push.lync.com -ProxyFqdn sipfed.online.lync.com  ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : OperationStopped: (:) [Test-CsFederatedPartner], FailureResponseException
        + FullyQualifiedErrorId : WorkflowNotCompleted,Microsoft.Rtc.Management.SyntheticTransactions.TestFederatedPartner
       Cmdlet
    VERBOSE: Workflow Instance ID 'd283786a-ba07-42ad-83e2-ad4ed5692597' completed.
    VERBOSE: Workflow run-time (sec): 0.1410312.
    Please let me know if this is causing the issue,
    Please note : As soon as I see this tried invoking the csmanagementstore replication and got to know my edge server is not up to date - I am sure this has no relation with push this is for getting the changes informed to edge server,
    Everything works normal with no issues apart from this,
    Seeking your valuable advice here,
    Thanks
    Nelson
    Nelson N Exchange 2003|2007|2010

    Hi Nelson,
    To better understand the issue, I would like to collect the following information.
    1. Have you added the new hosting provider, Microsoft Lync Online, and then set up hosting provider federation between your organization and Lync Online ?
    Configuring for push notifications in Lync Server 2013
    2. Have you installed the new root certificate?
    Lync Servers currently use the GTE CyberTrust Global Root and beginning on June 1st, 2013 will migrate to the Baltimore CyberTrust Root. The
    migration of Lync Online Service to use the new Baltimore trusted root Certificate Authority is planned during May 2013. As of June 1st 2013,
    all of our servers including the Lync Push Notifications Clearing House Service will be on Baltimore certs only. So please ensure that your Lync Server deployments have been updated to trust the Baltimore Root before that.
    http://blogs.technet.com/b/lync/archive/2013/05/02/lync-mobile-push-notifications.aspx
    In addition, it is recommend to update the Lync servers to the lasted version.
    Best regards,
    Eric

  • How do I install firefox on my android when I click on the download link it goes to a site that cannot be completed by my phone? LG Optimus

    When I click on the orange download for android button, it takes me to a site that is not able to be opened. An error message pops up. I prefer Firefox to the browser that came with the phone, but it does not show up at all in the Android Market.

    Sorry, Firefox is not available for the Sprint LG Optimus. For details, see https://wiki.mozilla.org/Mobile/Platforms/Android#System_Requirements

Maybe you are looking for

  • Screen goes black when playing "Tiger Woods PGA Tour 08"

    No need to mention that I am very happy with my new iMac. It replaces my G4 MDD PowerMac. The iMac is huge, quiet and fast on my graphic design jobs. I even won´t want to miss the glossy screen. Yesterday I received the brand new "Tiger Woods PGA Tou

  • List View Justification incorrect after sorting

    I am using a list view to display some data in Xcelsius SP3.  I have set the justification to 'Left' for the List View object and when the object is first display all numbers are correctly aligned.  However, if a sort is done by one of the column hea

  • Exporting to SWF: embed SWFs on pages?

    Hi there I've been experimenting with the export to SWF option in ID CS4. I was hoping I'd be able to place individual SWFs on each page of my ID document and then export the whole document as a sinlge SWF, giving me a nicely interactive publication.

  • Load variables externally?

    I am fairly new to flash. Can anybody give me any advice on how to load variables from an external file on my website that I can edit with a text editor. I am making a flash intro to a website that has a pull-down panel that displays information on n

  • When I open several Raw files and edit one, the others disappear

    Sometimes I open numerous raw files simultaneously and they appear on the left in a sidebar. Then I choose one to edit and when finished the others have disappeared and I have to load them again. Is there a keystroke that will bring them back without