EditTextフィールドの文字列を共有設定の文字列と比較しようとしています。文字列が一致すると、新しいアクティビティが開始されます。Sharedpreferencedの文字列は、Base64でエンコードされています。デコードされた後、編集テキスト文字列を共有設定文字列と比較しようとしていますが、コーディングを正しく行うことができません。これを正しくコーディングするにはどうすればよいですか。例をいただければ幸いです。私のコンパレータは77行目と78行目にあります
44. public void onClick(View arg0) {
45.
46. sp=this.getSharedPreferences("AccessApp", MODE_WORLD_READABLE);
47.
48.
49.
50.
51. byte[] key = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5 };
52.
53.
54. try {
55. user = sp.getString("USERNAME_KEY", null);
56. String decryptedUser = decrypt(user, key);
57.
58.
59. }
60. catch (Exception e) {
61. // TODO Auto-generated catch block
62. e.printStackTrace();
63. }
64. try {
65. pass = sp.getString("PASSWORD_KEY", null);
66. String decryptedPass = decrypt(pass, key);
67.
68.
69.
70. } catch (Exception e) {
71. // TODO Auto-generated catch block
72. e.printStackTrace();
73. }
74.
75. if(lBttn.equals(arg0)){
76.
77. if((uname.getText().toString().equals(decryptedUser)) &&
78. (pword.getText().toString().equals(decryptedPass)))
79.
80. {
81. Toast.makeText(this, "You are Logged In", 20000).show();
82.
83. Intent intent;
84. intent=new Intent(this,details.class);
85. startActivity(intent);
86. flag=1;
87. }