0

パスワード (文字列) を Titan アプリケーションに保存するにはどうすればよいですか? たとえば、チタンにはAndroidの秘密鍵のアナログがありますか?

(私はアンドロイドのためにのみ必要です)

ありがとう!

4

2 に答える 2

1

iOS (および Mac) には、キーチェーンと呼ばれるパスワードなどを安全に保存するためのメカニズムがあります。Titanium には、この API をサポートするsecureというモジュールがあります。

安全にインストールしたら、この時点でパスワードを保存するのは簡単です。

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

//You can provide optional identifier, if none provided securely uses your bundle id
// This wraps the Keychain functions
var SecureProperties = securely.createProperties({
    identifier:"Foo",
    accessGroup:"Bar"
});

// Now add it to the properties
SecureProperties.setString('Password', the_password_var);
// Get it back
var MyPassword = SecureProperties.getString("password");
于 2013-09-04T11:56:09.803 に答える
-4

Titaniumのファイルシステムは確認しましたか?プロパティを使用 してデータを保存できます

これを使ってみましたか

Titanium.App.Properties.setString("password","P@ssw0rD"); 
var MyPassword = Titanium.App.Properties.getString("password");

こちらもご確認ください

于 2013-09-04T06:44:50.633 に答える