]> hydra-www.ietfng.org Git - android-vcpass-oisafe/commitdiff
OI Safe: Turn off debug messages and mark version 1.1.1.
authorpeli0101 <peli0101@72b678ce-9140-0410-bee8-679b907dd61a>
Sat, 30 May 2009 13:28:04 +0000 (13:28 +0000)
committerpeli0101 <peli0101@72b678ce-9140-0410-bee8-679b907dd61a>
Sat, 30 May 2009 13:28:04 +0000 (13:28 +0000)
git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@2115 72b678ce-9140-0410-bee8-679b907dd61a

AndroidManifest.xml
readme.txt
src/org/openintents/safe/CryptoContentProvider.java
src/org/openintents/safe/CryptoHelper.java

index 9e89ac3103181db55caa7fb92536712fe13f7783..17d7b90183219000491ae3724fca0689db33d88f 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="org.openintents.safe" \r
-    android:versionName="1.1.1-rc1" android:versionCode="7">\r
-    <!-- History:\r
+    android:versionName="1.1.1" android:versionCode="8">\r
+    <!-- History:
+    1.1.1 [8]: 2009-05-30\r
     1.1.0 [6]: 2009-03-17\r
     1.0.0 [4]: 2009-02-02\r
      -->
index 8da2698aff6f15251a5aa5c14e8c44674bc9be56..2fc8067190b692b97c9daae5eb3320462fd012ad 100644 (file)
@@ -26,10 +26,11 @@ To obtain the current release, visit
 \r
 ---------------------------------------------------------\r
 release: 1.1.1\r
-date: 2009-??\r
+date: 2009-05-30\r
 \r
 - Secure deletion of CSV files after import.\r
-- Add support for file encryption.\r
+- Add support for file stream encryption,\r
+  to be used by Obscura.\r
 - Add Trivium stream cipher.\r
 \r
 ---------------------------------------------------------\r
index 6c17a46dc53836ada8ea7101ea09a0f05ae906a4..6ad3bd41ab12171a0e4df8030eda2016603af9ef 100644 (file)
@@ -32,7 +32,7 @@ import android.util.Log;
 \r
 public class CryptoContentProvider extends ContentProvider {\r
 \r
-       private static final boolean debug = true;\r
+       private static final boolean debug = false;\r
        private static final String TAG = "CryptoContentProvider";\r
 \r
        public static final String AUTHORITY = "org.openintents.safe";\r
@@ -148,7 +148,7 @@ public class CryptoContentProvider extends ContentProvider {
                                        return null;\r
                                }\r
                                \r
-                               Log.d(TAG, "Original file path: " + originalFile);\r
+                               if (debug) Log.d(TAG, "Original file path: " + originalFile);\r
                                        if (CategoryList.isSignedIn()==false) {\r
                                                Intent frontdoor = new Intent(getContext(), FrontDoor.class);\r
                                                frontdoor.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r
@@ -159,12 +159,12 @@ public class CryptoContentProvider extends ContentProvider {
                                if (ch == null) {\r
                                        throw new CryptoHelperException("CryptoHelper not available. Are you logged in?");\r
                                }\r
-                               Log.d(TAG, "Decrypt..");\r
+                               if (debug) Log.d(TAG, "Decrypt..");\r
                                Uri newuri = ch.decryptFileWithSessionKeyThroughContentProvider(this.getContext(), Uri.parse(originalFile));\r
                                cryptSession = newuri.getPathSegments().get(1);\r
                                sessionFile=SESSION_FILE+"."+cryptSession;\r
                                path += "/"+sessionFile;\r
-                               Log.d(TAG, "New path: " + path);\r
+                               if (debug) Log.d(TAG, "New path: " + path);\r
                                        break;\r
                                default:\r
                                        throw new IllegalArgumentException("Unknown URI " + uri);\r
@@ -180,7 +180,7 @@ public class CryptoContentProvider extends ContentProvider {
                // disappears.   This makes for a one time use\r
                // content provider.\r
                if (!getContext().deleteFile(sessionFile)) {\r
-                       Log.e(TAG,"openFile: unable to delete: "+sessionFile);\r
+                       if (debug) Log.e(TAG,"openFile: unable to delete: "+sessionFile);\r
                }\r
                } catch (FileNotFoundException e) {\r
                        if (debug) Log.d(TAG,"openFile: FileNotFound");\r
index aae113152f58346b53aa1d30cc2e227992ed267e..00940312206d271104089d768f8c7188a345d82d 100644 (file)
@@ -66,7 +66,7 @@ import estreamj.framework.ESJException;
  */\r
 public class CryptoHelper {\r
 \r
-       private static final boolean debug = true;\r
+       private static final boolean debug = false;\r
     private static String TAG = "CryptoHelper";\r
     \r
     public static final String OISAFE_EXTENSION = ".oisafe";\r
@@ -432,7 +432,7 @@ public class CryptoHelper {
      * @throws Exception\r
      */\r
     public String encryptWithSessionKey(String plaintext) throws CryptoHelperException {\r
-       Log.i(TAG, "Encrypt with session key");\r
+       if (debug) Log.i(TAG, "Encrypt with session key");\r
                status=false; // assume failure\r
                if(password == null) {\r
                    String msg = "Must call setPassword before runing encrypt.";\r
@@ -498,7 +498,7 @@ public class CryptoHelper {
                String stringCipherVersion = "A";\r
                String stringCipherSessionKey = toHexString(cipherSessionKey);\r
                String stringCiphertext=toHexString(ciphertext);\r
-               Log.i(TAG, "Length: " + stringCipherSessionKey.length() + ", " + stringCipherSessionKey);\r
+               if (debug) Log.i(TAG, "Length: " + stringCipherSessionKey.length() + ", " + stringCipherSessionKey);\r
                \r
                StringBuilder sb = new StringBuilder(stringCipherVersion.length() \r
                                + stringCipherSessionKey.length() \r
@@ -759,7 +759,7 @@ public class CryptoHelper {
      * @throws Exception\r
      */\r
     public Uri decryptFileWithSessionKey(Context ctx, Uri fileUri) throws CryptoHelperException {\r
-       Log.d(TAG, "fileUri="+fileUri.toString());\r
+       if (debug) Log.d(TAG, "fileUri="+fileUri.toString());\r
        ContentResolver contentResolver = ctx.getContentResolver();\r
 \r
        String inputPath = null;\r
@@ -837,7 +837,7 @@ public class CryptoHelper {
      * @throws Exception\r
      */\r
     public Uri decryptFileWithSessionKeyThroughContentProvider(Context ctx, Uri fileUri) throws CryptoHelperException {\r
-       Log.d(TAG, "fileUri="+fileUri.toString());\r
+       if (debug) Log.d(TAG, "fileUri="+fileUri.toString());\r
        ContentResolver contentResolver = ctx.getContentResolver();\r
        \r
        String sessionFile = "";\r