test
This commit is contained in:
parent
972539971d
commit
f32badc862
1 changed files with 7 additions and 7 deletions
|
@ -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 "";
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue