diff options
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/entities/DownloadableFile.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/entities/DownloadableFile.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/entities/DownloadableFile.java b/src/main/java/de/thedevstack/conversationsplus/entities/DownloadableFile.java index 9a677cd0..8d608ae7 100644 --- a/src/main/java/de/thedevstack/conversationsplus/entities/DownloadableFile.java +++ b/src/main/java/de/thedevstack/conversationsplus/entities/DownloadableFile.java @@ -22,7 +22,7 @@ import javax.crypto.spec.SecretKeySpec; import de.thedevstack.conversationsplus.Config; import de.thedevstack.conversationsplus.utils.MimeUtils; -import android.util.Log; +import de.thedevstack.conversationsplus.utils.Logging; public class DownloadableFile extends File { @@ -114,19 +114,19 @@ public class DownloadableFile extends File { IvParameterSpec ips = new IvParameterSpec(iv); Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); cipher.init(Cipher.ENCRYPT_MODE, this.getKey(), ips); - Log.d(Config.LOGTAG, "opening encrypted input stream"); + Logging.d(Config.LOGTAG, "opening encrypted input stream"); return new CipherInputStream(new FileInputStream(this), cipher); } catch (NoSuchAlgorithmException e) { - Log.d(Config.LOGTAG, "no such algo: " + e.getMessage()); + Logging.d(Config.LOGTAG, "no such algo: " + e.getMessage()); return null; } catch (NoSuchPaddingException e) { - Log.d(Config.LOGTAG, "no such padding: " + e.getMessage()); + Logging.d(Config.LOGTAG, "no such padding: " + e.getMessage()); return null; } catch (InvalidKeyException e) { - Log.d(Config.LOGTAG, "invalid key: " + e.getMessage()); + Logging.d(Config.LOGTAG, "invalid key: " + e.getMessage()); return null; } catch (InvalidAlgorithmParameterException e) { - Log.d(Config.LOGTAG, "invavid iv:" + e.getMessage()); + Logging.d(Config.LOGTAG, "invavid iv:" + e.getMessage()); return null; } catch (FileNotFoundException e) { return null; @@ -146,20 +146,20 @@ public class DownloadableFile extends File { IvParameterSpec ips = new IvParameterSpec(this.iv); Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, this.getKey(), ips); - Log.d(Config.LOGTAG, "opening encrypted output stream"); + Logging.d(Config.LOGTAG, "opening encrypted output stream"); return new CipherOutputStream(new FileOutputStream(this), cipher); } catch (NoSuchAlgorithmException e) { - Log.d(Config.LOGTAG, "no such algo: " + e.getMessage()); + Logging.d(Config.LOGTAG, "no such algo: " + e.getMessage()); return null; } catch (NoSuchPaddingException e) { - Log.d(Config.LOGTAG, "no such padding: " + e.getMessage()); + Logging.d(Config.LOGTAG, "no such padding: " + e.getMessage()); return null; } catch (InvalidKeyException e) { - Log.d(Config.LOGTAG, "invalid key: " + e.getMessage()); + Logging.d(Config.LOGTAG, "invalid key: " + e.getMessage()); return null; } catch (InvalidAlgorithmParameterException e) { - Log.d(Config.LOGTAG, "invavid iv:" + e.getMessage()); + Logging.d(Config.LOGTAG, "invavid iv:" + e.getMessage()); return null; } catch (FileNotFoundException e) { return null; |