8000 Comment out char-based key/rekey, and setLocale · dw3/android-database-sqlcipher@10e14f3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 10e14f3

Browse files
Comment out char-based key/rekey, and setLocale
1 parent 93b1ae0 commit 10e14f3

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

src/net/sqlcipher/database/SQLiteDatabase.java

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public void changePassword(char[] password) throws SQLiteException {
121121
if (!isOpen()) {
122122
throw new SQLiteException("database not open");
123123
}
124-
native_rekey(password);
124+
native_rekey(String.valueOf(password));
125125
}
126126

127127
private static void loadICUData(Context context, File workingDir) {
@@ -170,17 +170,19 @@ public static synchronized void loadLibs (Context context) {
170170
}
171171

172172
public static synchronized void loadLibs (Context context, File workingDir) {
173-
System.loadLibrary("stlport_shared");
174-
System.loadLibrary("sqlcipher_android");
175-
System.loadLibrary("database_sqlcipher");
173+
System.loadLibrary("sqlcipher");
174+
175+
// System.loadLibrary("stlport_shared");
176+
// System.loadLibrary("sqlcipher_android");
177+
// System.loadLibrary("database_sqlcipher");
176178

177-
boolean systemICUFileExists = new File("/system/usr/icu/icudt46l.dat").exists();
179+
// boolean systemICUFileExists = new File("/system/usr/icu/icudt46l.dat").exists();
178180

179-
String icuRootPath = systemICUFileExists ? "/system/usr" : workingDir.getAbsolutePath();
180-
setICURoot(icuRootPath);
181-
if(!systemICUFileExists){
182-
loadICUData(context, workingDir);
183-
}
181+
// String icuRootPath = systemICUFileExists ? "/system/usr" : workingDir.getAbsolutePath();
182+
// setICURoot(icuRootPath);
183+
// if(!systemICUFileExists){
184+
// loadICUData(context, workingDir);
185+
// }
184186
}
185187

186188
/**
@@ -2325,7 +2327,7 @@ private void openDatabaseInternal(char[] password, SQLiteDatabaseHook databaseHo
23252327
databaseHook.preKey(this);
23262328
}
23272329

2328-
native_key(password);
2330+
native_key(String.valueOf(password));
23292331

23302332
if(databaseHook != null){
23312333
databaseHook.postKey(this);
@@ -2335,7 +2337,7 @@ private void openDatabaseInternal(char[] password, SQLiteDatabaseHook databaseHo
23352337
mTimeOpened = getTime();
23362338
}
23372339
try {
2338-
setLocale(Locale.getDefault());
2340+
//setLocale(Locale.getDefault());
23392341
} catch (RuntimeException e) {
23402342
Log.e(TAG, "Failed to setLocale() when constructing, closing the database", e);
23412343
dbclose();
@@ -2811,9 +2813,9 @@ private static ArrayList<Pair<String, String>> getAttachedDbs(SQLiteDatabase dbO
28112813

28122814
private native int native_status(int operation, boolean reset);
28132815

2814-
private native void native_key(char[] key) throws SQLException;
2816+
//private native void native_key(char[] key) throws SQLException;
28152817
private native void native_key(String key) throws SQLException;
28162818

28172819
private native void native_rekey(String key) throws SQLException;
2818-
private native void native_rekey(char[] key) throws SQLException;
2820+
//private native void native_rekey(char[] key) throws SQLException;
28192821
}

0 commit comments

Comments
 (0)
0