1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    Mnemonic1 is on a distinguished road

      0  

    Default Answered: What about security implementation in Sencha?

    Answered: What about security implementation in Sencha?


    Hi There,

    If I want to use a local storage facility (like sql-lite or files or
    what ever is available in HTML5 to store data locally), how can I secure
    the data (encrypt). If I read data from a server I could use https (I
    asume that is implemented) in stead of normal http. But as I would only
    use that for refreshing data and have my application use local file
    storage to retrieve the data I want it to be secure in case the device
    gets lost...

    What are the possibilities and/or best practice using Sencha?

    Thanks..

  2. Sencha does not have any encryption library. There are many out there that you can use but will affect performance.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Sencha does not have any encryption library. There are many out there that you can use but will affect performance.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    4
    Vote Rating
    0
    Mnemonic1 is on a distinguished road

      0  

    Default


    Thanks for the answer at least it's a clear one

    So for anyone also interested in this topic..

    I did some research and have come up with a library called "sjcl", that has a wide implementation of different encryption algorithms. It can be used in the form of sjcl.encrypt("some password", "the data to encrypt") and sjcl.decrypt("some password", "the data enrypted with this password") .

    I have tested it and it works like a charm, so everything I put in a localStorage store is now safe (uhm, safe! well lets say it is not simple to read).

    It comes as a sjcl,js file (18 Kb and under GPL license) and I used the Sencha generated app.html to include it for my project. I asume that is the correct way to "import" a javascript library. If there is a more "standard" way to do that, plz let me know.

    Thanks..

  5. #4
    Sencha Premium Member dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,083
    Answers
    24
    Vote Rating
    44
    dawesi has a spectacular aura about dawesi has a spectacular aura about

      1  

    Default


    For those who read this later:

    Stanford Javascript Crypto Library
    http://crypto.stanford.edu/sjcl/
    Teahouse Training Company
    Official Certified Sencha Trainer

    Australia / New Zealand / Singapore / Hong Kong & APAC



    SenchaWorld.com - Sencha webinars, videos, etc
    SenchaForge.org - (coming soon)
    TeahouseHQ.com - Sencha ecosystem training portal

    Code Validation : JSLint | JSONLint | JSONPLint

  6. #5
    Sencha Premium Member Matt Jenkins's Avatar
    Join Date
    Mar 2013
    Location
    Insch, Aberdeenshire, Scotland
    Posts
    24
    Answers
    1
    Vote Rating
    3
    Matt Jenkins is on a distinguished road

      0  

    Default


    Can you let me know how you include this as when I try to add it to my app.json file I end up with "Uncaught ReferenceError: sjcl is not defined"

    Code:
    {           
        "path": "resources/js/sjcl.js"
    },        
    {
        "path": "touch/sencha-touch.js",
        "x-bootstrap": true
    },
    {
        "path": "app.js",
        "bundle": true,
         "update": "full"
    }


  7. #6
    Sencha User
    Join Date
    Apr 2012
    Posts
    7
    Answers
    2
    Vote Rating
    0
    rafferty is on a distinguished road

      0  

    Default


    Hey there, I included the js file simply in my index.html file:
    Code:
    <script type="text/javascript" src="sdk/sjcl.js"></script>
    That is all I needed to do and I could access sjcl.encrypt/decrypt via chrome terminal for testing.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi