diff --git a/example/app.js b/example/app.js index a8f15fa..1be85ba 100644 --- a/example/app.js +++ b/example/app.js @@ -18,11 +18,6 @@ var App = { }; global.App = App; -var isAndroid = Ti.Platform.name === 'android'; -global.isAndroid = isAndroid; -var isiOS = Ti.Platform.name === 'iOS' || Ti.Platform.name === 'iPhone OS'; -global.isiOS = isiOS; - // Load the crypto modules var Crypto = require('ti.crypto'); global.Crypto = Crypto; diff --git a/example/test.js b/example/test.js index e663586..55ffe60 100644 --- a/example/test.js +++ b/example/test.js @@ -387,7 +387,7 @@ testAlgorithm({ multiple: [ 'Titanium Crypto Module', 'Some additional text to encrypt' ], multipleEncrypted: [ 'WNaIeDZqUTMPdlHm35r3Uw==', 'WNaIeDZqUTMPdlHm35r3U9R50OumHt987wOrM7GuNVJ+m9+ZR/03jngU6vPygXrR' ] }); -if (isiOS) { +if (OS_IOS) { testAlgorithm({ id: 'RC4xMin', keySize: Crypto.KEYSIZE_MINRC4, diff --git a/example/ui.js b/example/ui.js index 10912cc..f7aa71a 100644 --- a/example/ui.js +++ b/example/ui.js @@ -1,6 +1,6 @@ App.UI = (function () { var algorithms; - if (isiOS) { + if (OS_IOS) { algorithms = [ { title: 'AES-128', subTitle: '128-bit key', keySize: Crypto.KEYSIZE_AES128, algorithm: Crypto.ALGORITHM_AES128, options: Crypto.OPTION_PKCS7PADDING }, { title: 'AES-128', subTitle: '192-bit key', keySize: Crypto.KEYSIZE_AES192, algorithm: Crypto.ALGORITHM_AES128, options: Crypto.OPTION_PKCS7PADDING }, @@ -15,7 +15,7 @@ App.UI = (function () { { title: 'RC2', subTitle: '1024-bit key', keySize: Crypto.KEYSIZE_MAXRC2, algorithm: Crypto.ALGORITHM_RC2, options: Crypto.OPTION_PKCS7PADDING } ]; } - if (isAndroid) { + if (OS_ANDROID) { algorithms = [ { title: 'AES-128', subTitle: '128-bit key', keySize: Crypto.KEYSIZE_AES128, algorithm: Crypto.ALGORITHM_AES128, options: Crypto.OPTION_PKCS7PADDING }, { title: 'AES-128', subTitle: '192-bit key', keySize: Crypto.KEYSIZE_AES192, algorithm: Crypto.ALGORITHM_AES128, options: Crypto.OPTION_PKCS7PADDING }, @@ -95,7 +95,6 @@ App.UI = (function () { function openDemoWindow(controller) { var demoWindow = Ti.UI.createWindow({ - backgroundColor: 'white', layout: 'vertical' });