Skip to content

Commit 2d575fa

Browse files
Efraín EspadaEfraín Espada
authored andcommitted
methods
1 parent 33ccb15 commit 2d575fa

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

library/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ add_library( # Sets the name of the library.
1717
SHARED
1818

1919
# Provides a relative path to your source file(s).
20-
../../stringcare-jni-android-library/native-lib.cpp)
20+
../../stringcare-jni-android-library/lib/native-lib.cpp)
2121

2222
# Searches for a specified prebuilt library and stores the path as a
2323
# variable. Because CMake includes system libraries in the search path by

library/src/main/java/com/stringcare/library/SC.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ private SC () {
4848
// nothing to do here
4949
}
5050

51-
/**
52-
* Resigns given key
53-
*/
54-
private static native String sign(String key);
5551

5652
private static native String jniObfuscate(Context context, String key, String value);
5753

@@ -222,10 +218,8 @@ public static String obfuscate(String value) {
222218
Log.e(TAG, "Library not initialized: SC.init(Context)");
223219
return null;
224220
}
225-
226-
String hash = sign(getCertificateSHA1Fingerprint());
227221
try {
228-
return jniObfuscate(context, hash, value);
222+
return jniObfuscate(context, getCertificateSHA1Fingerprint(), value);
229223
} catch (Exception e) {
230224
e.printStackTrace();
231225
}
@@ -242,10 +236,8 @@ public static String deobfuscate(String value) {
242236
Log.e(TAG, "Library not initialized: SC.init(Context)");
243237
return null;
244238
}
245-
246-
String hash = sign(getCertificateSHA1Fingerprint());
247239
try {
248-
return jniDeobfuscate(context, hash, value);
240+
return jniDeobfuscate(context, getCertificateSHA1Fingerprint(), value);
249241
} catch (Exception e) {
250242
e.printStackTrace();
251243
}

0 commit comments

Comments
 (0)