Code Monkey home page Code Monkey logo

ti_keychain's Introduction

ti_keychain module

The keychain module provides methods for securely storing sensitive data on iOS and Android.

IMPORTANT NOTE

Version 1.0 for iOS contains a design flaw where the identifier passed to createKeychainItem() is stored in the account field of the keychain item. If you ever change the value of the account property, a new item will be created. In version 2.0, this problem has been fixed by assigning the identifier to the label field of the keychain item. If you are using 1.0 and want to upgrade to 2.0, you will need to continue to use the account name as the keychain item identifier, but will be free to change the account property of the keychain item once it is fetched.

Installation

gitTio

  1. Download the module from the Releases section of the Github repository. Save the module ZIP to either your project's root directory (the same directory as the Resources folder) or your Titanium SDK installation directory.
  2. Edit tiapp.xml and add the following line to the <modules> section, using the version number specified in the ZIP file name:
<module version="2.0">com.obscure.keychain</module>
  1. Clean and rebuild your project.

Detailed instructions for installing modules can be found on the Appcelerator documentation site.

Usage Example

var keychain = require('com.obscure.keychain');

// NOTE passphrase is ignored on iOS
var keychainItem = keychain.createKeychainItem('server account', 'supersecretpassphrase');

// get values
alert('Your account name is ' + keychainItem.account);

// set values
keychainItem.account = 'pegli'; // username
keychainItem.valueData = 'correctbatteryhorsestaple'; // password

ti_keychain's People

Contributors

pegli avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.