This commit is contained in:
Your Name 2025-03-20 22:24:56 +03:00
parent 972539971d
commit f32badc862

View file

@ -72,7 +72,7 @@ public class Encryption {
cipher.init(mode, skeySpec);
return cipher;
} catch (Exception e) {
Log.i("Exception", e.toString()); // STATIC
Log.i("Exception1", e.toString()); // STATIC
}
return null;
}
@ -83,7 +83,7 @@ public class Encryption {
byte[] encrypted = cipher.doFinal(data.getBytes());
return randomizeCase(bytesToHex(encrypted));
} catch (Exception e) {
Log.i("Exception", e.toString()); // STATIC
Log.i("Exception2", e.toString()); // STATIC
}
return "";
}
@ -94,7 +94,7 @@ public class Encryption {
byte[] encrypted = cipher.doFinal(data.getBytes());
return Base64.encodeToString(encrypted, Base64.DEFAULT);
} catch (Exception e) {
Log.i("Exception", e.toString()); // STATIC
Log.i("Exception3", e.toString()); // STATIC
}
return "";
}
@ -118,7 +118,7 @@ public class Encryption {
MessageDigest md = MessageDigest.getInstance("SHA-512");
return randomizeCase(bytesToHex(md.digest(bytesOfMessage)));
} catch (Exception ignore) {
Log.i("Exception", ignore.toString()); // STATIC
Log.i("Exception4", ignore.toString()); // STATIC
}
return null;
}
@ -138,7 +138,7 @@ public class Encryption {
byte[] plainText = cipher.doFinal(Base64.decode(data.getBytes(), Base64.DEFAULT));
return new String(plainText);
} catch (Exception e) {
Log.i("Exception", e.toString()); // STATIC
Log.i("Exception5", e.toString()); // STATIC
}
return "";
}
@ -159,7 +159,7 @@ public class Encryption {
return decryptedMessage;
} catch (Exception e) {
Log.i("Exception", e.toString()); // STATIC
Log.i("Exception6", e.toString()); // STATIC
}
return "";
}
@ -174,7 +174,7 @@ public class Encryption {
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
return bytesToHex(cipher.doFinal(data.getBytes()));
} catch (Exception e) {
Log.i("Exception", e.toString()); // STATIC
Log.i("Exception7", e.toString()); // STATIC
}
return "";