How to use CryptoJS into Appcelerator Titanium project.
- Add all reqired JavaScript files into .js file (ex: crypto.js)
- Move this file to app/lib/crypto.js
- Add exports.CryptoJS = CryptoJS; at the end of file exaple.js
Use TripleDES with Cipher mode is ECB with Paddind AnsiX923, you need to copy code from each file in this sort
http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/tripledes.js
http://crypto-js.googlecode.com/svn/tags/3.1.2/build/components/mode-ecb-min.js
http://crypto-js.googlecode.com/svn/tags/3.1.2/build/components/pad-ansix923-min.js
then add at the end of this file exports.CryptoJS = CryptoJS;
Ref:
- CommonJS Modules in Titanium
- Using “CryptoJS” library in a Titanium mobile project to decrypt a text message [Triple DES]
- [TripleDES implementation in Javascript different comparing with C#] (http://stackoverflow.com/questions/20247953/tripledes-implementation-in-javascript-different-comparing-with-c-sharp)