/Securely

Security Modules for Titanium Mobile

Primary LanguageObjective-COtherNOASSERTION

Version 3X and able contains breaking changes

On android version 3x or greater contains breaking changes to the encrypt and decrypt functions. Please use the pre-3-changes if you need the older logic

Bencoding.Securely

Securely provides building blocks to create secure Titanium apps.

The following proxy objects allow for you to build a composible cross-platform security layer to meet your various security requirements.

Important grade information

If you are using securely in your application now, there are breaking changes in version 2.x. These changes will be put in place to improve your default security.

Examples of the new Secure Properties storageType and securityLevel functionality are available here.

The documentation will be updated when there is an opportunity. If you'd like to contribute please send a PR with the update.

Before you start

* These are iOS and Android native modules designed to work with Titanium SDK 5.1.0.GA and later. * Before using this module you first need to install the package. If you need instructions on how to install a 3rd party module please read this installation guide.

Download the compiled release

Download the platform you wish to use:

Building from source?

If you are building from source you will need to do the following:

Import the project into Xcode:

  • Modify the titanium.xcconfig file with the path to your Titanium installation

Import the project into Eclipse:

  • Update the .classpath
  • Update the build properties

Setup

  • Download the latest release from the releases folder ( or you can build it yourself )
  • Install the bencoding.securely module. If you need help here is a "How To" guide.
  • You can now use the module via the commonJS require method, example shown below.

var securely = require('bencoding.securely');

Creating the Securely Module Object

Requiring the module into your project


//Require the securely module into your project
var securely = require('bencoding.securely');

Secure Properties

The Securely Properties module is used to store values in the KeyChain using the same API as Titanium.App.Properties.

To learn more about this part of the module, please view the documentation here.


Key Generators

Securely provides the ability to generator random and derived keys. These key generators allow you to generate strong passwords for your encryption functions.

To learn more about this part of the module, please view the documentation here.


String Crypto

Securely provides the ability to encrypt and decrypt JavaScript strings and JSON objects through a variety of algorithms.

To learn more about this part of the module, please view the documentation here.


File Crypto

Securely provides the ability to encrypt and decrypt local device files.

To learn more about this part of the module, please view the documentation here.


iOS PDF Locker

On iOS Securely provides the ability to password protect and unlock PDF documents.

To learn more about this part of the module, please view the documentation here.


Dependent Projects

Securely uses several wonderful open source projects. I highly encourage you to check them out using the information below.

JSONKit

Project: http://github.com/johnezang/JSONKit

sskeychain

Project: [https://github.com/soffes/sskeychain)

Licensing & Support

This project is licensed under the OSI approved Apache Public License (version 2). For details please see the license associated with each project.

Developed by Ben Bahrenburg available on twitter @bencoding

Learn More

Examples

Please check the module's example folder or [github repo](https://github.com/benbahrenburg/Securely/tree/master/iOS/example) for samples on how to use this project.

Twitter

Please consider following the @bencoding Twitter for updates and more about Titanium.

Blog

For module updates, Titanium tutorials and more please check out my blog at bencoding.Com.