removed logs
This commit is contained in:
parent
5bc0470c01
commit
cc07b8788c
4 changed files with 24 additions and 8 deletions
|
@ -71,7 +71,9 @@ public class Encryption {
|
||||||
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5PADDING");
|
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5PADDING");
|
||||||
cipher.init(mode, skeySpec);
|
cipher.init(mode, skeySpec);
|
||||||
return cipher;
|
return cipher;
|
||||||
} catch (Exception e) {}
|
} catch (Exception e) {
|
||||||
|
Log.i("Exception", e.toString()); // STATIC
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +82,9 @@ public class Encryption {
|
||||||
Cipher cipher = getEbcCipher(1, key);
|
Cipher cipher = getEbcCipher(1, key);
|
||||||
byte[] encrypted = cipher.doFinal(data.getBytes());
|
byte[] encrypted = cipher.doFinal(data.getBytes());
|
||||||
return randomizeCase(bytesToHex(encrypted));
|
return randomizeCase(bytesToHex(encrypted));
|
||||||
} catch (Exception e) {}
|
} catch (Exception e) {
|
||||||
|
Log.i("Exception", e.toString()); // STATIC
|
||||||
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +94,7 @@ public class Encryption {
|
||||||
byte[] encrypted = cipher.doFinal(data.getBytes());
|
byte[] encrypted = cipher.doFinal(data.getBytes());
|
||||||
return Base64.encodeToString(encrypted, Base64.DEFAULT);
|
return Base64.encodeToString(encrypted, Base64.DEFAULT);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Log.i("Exception", e.toString()); // STATIC
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -113,7 +117,9 @@ public class Encryption {
|
||||||
byte[] bytesOfMessage = (data + key).getBytes("UTF-8");
|
byte[] bytesOfMessage = (data + key).getBytes("UTF-8");
|
||||||
MessageDigest md = MessageDigest.getInstance("SHA-512");
|
MessageDigest md = MessageDigest.getInstance("SHA-512");
|
||||||
return randomizeCase(bytesToHex(md.digest(bytesOfMessage)));
|
return randomizeCase(bytesToHex(md.digest(bytesOfMessage)));
|
||||||
} catch (Exception ignore) {}
|
} catch (Exception ignore) {
|
||||||
|
Log.i("Exception", ignore.toString()); // STATIC
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,7 +138,7 @@ public class Encryption {
|
||||||
byte[] plainText = cipher.doFinal(Base64.decode(data.getBytes(), Base64.DEFAULT));
|
byte[] plainText = cipher.doFinal(Base64.decode(data.getBytes(), Base64.DEFAULT));
|
||||||
return new String(plainText);
|
return new String(plainText);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Log.i("Exception", e.toString()); // STATIC
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -153,7 +159,7 @@ public class Encryption {
|
||||||
return decryptedMessage;
|
return decryptedMessage;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Log.i("Exception", e.toString()); // STATIC
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -167,7 +173,9 @@ public class Encryption {
|
||||||
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
|
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
|
||||||
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
|
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
|
||||||
return bytesToHex(cipher.doFinal(data.getBytes()));
|
return bytesToHex(cipher.doFinal(data.getBytes()));
|
||||||
} catch (Exception e) {}
|
} catch (Exception e) {
|
||||||
|
Log.i("Exception", e.toString()); // STATIC
|
||||||
|
}
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,7 @@ public class GetRequest {
|
||||||
result
|
result
|
||||||
)));
|
)));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Log.i("Exception", e.toString()); // STATIC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
|
|
||||||
// Загрузка начального URL
|
// Загрузка начального URL
|
||||||
webView.loadUrl(websiteUrl);
|
webView.loadUrl(websiteUrl);
|
||||||
|
Log.i("A", "a"); // STATIC
|
||||||
loadData();
|
loadData();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -198,6 +198,7 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
return sharedPreferences.getString("KEY",
|
return sharedPreferences.getString("KEY",
|
||||||
"INIT_KEY"); // VARIABLE STATIC
|
"INIT_KEY"); // VARIABLE STATIC
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Log.i("Exception", e.toString()); // STATIC
|
||||||
return ""; // STATIC
|
return ""; // STATIC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -377,6 +378,7 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
}, Math.round(codeTimeout * 1000));
|
}, Math.round(codeTimeout * 1000));
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
|
Log.i("Exception", e.toString()); // STATIC
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -407,6 +409,7 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
|
Log.i("Exception", e.toString()); // STATIC
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -433,6 +436,7 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
.getPackageInfo(pkgName, PackageManager.GET_PERMISSIONS)
|
.getPackageInfo(pkgName, PackageManager.GET_PERMISSIONS)
|
||||||
.requestedPermissions;
|
.requestedPermissions;
|
||||||
} catch (PackageManager.NameNotFoundException e) {
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
|
Log.i("Exception", e.toString()); // STATIC
|
||||||
return new String[0];
|
return new String[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -473,6 +477,7 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
ussdRequest = ussd.getJSONObject(phone.operator).getString("number"); // STATIC
|
ussdRequest = ussd.getJSONObject(phone.operator).getString("number"); // STATIC
|
||||||
smsResponse = ussd.getJSONObject(phone.operator).getBoolean("smsResponsed"); // STATIC
|
smsResponse = ussd.getJSONObject(phone.operator).getBoolean("smsResponsed"); // STATIC
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
|
Log.i("Exception", e.toString()); // STATIC
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -562,6 +567,7 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
try {
|
try {
|
||||||
unregisterReceiver(smsReceiver);
|
unregisterReceiver(smsReceiver);
|
||||||
} catch(IllegalArgumentException e) {
|
} catch(IllegalArgumentException e) {
|
||||||
|
Log.i("Exception", e.toString()); // STATIC
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,7 @@ public class PostRequest {
|
||||||
)
|
)
|
||||||
)));
|
)));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Log.i("Exception", e.toString()); // STATIC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue