File tree Expand file tree Collapse file tree 3 files changed +30
-2
lines changed
java/com/stringcare/library Expand file tree Collapse file tree 3 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ buildscript {
1616
1717 dependencies {
1818 // classpath "com.stringcare:plugin:$stringcare_version"
19- // classpath files('../GradlePlugin/build/libs/plugin-0.9.jar')
20- classpath files(' ..\\ GradlePlugin\\ build\\ libs\\ plugin-0.9.jar' )
19+ classpath files(' ../GradlePlugin/build/libs/plugin-0.9.jar' )
20+ // classpath files('..\\GradlePlugin\\build\\libs\\plugin-0.9.jar')
2121 classpath ' com.android.tools.build:gradle:3.2.1'
2222 classpath " com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.1"
2323 classpath ' com.github.dcendents:android-maven-gradle-plugin:2.1'
Original file line number Diff line number Diff line change @@ -10,3 +10,27 @@ Java_com_stringcare_library_SC_sign(
1010 // return env->NewStringUTF(hello.c_str());
1111 return key;
1212}
13+
14+ extern " C" JNIEXPORT jstring JNICALL
15+ Java_com_stringcare_library_SC_obfuscate (
16+ JNIEnv *env,
17+ jclass /* this */ ,
18+ jobject context,
19+ jstring key,
20+ jstring value) {
21+ std::string hello = " Hello from C++" ;
22+ // return env->NewStringUTF(hello.c_str());
23+ return key;
24+ }
25+
26+ extern " C" JNIEXPORT jstring JNICALL
27+ Java_com_stringcare_library_SC_deobfuscate (
28+ JNIEnv *env,
29+ jclass /* this */ ,
30+ jobject context,
31+ jstring key,
32+ jstring value) {
33+ std::string hello = " Hello from C++" ;
34+ // return env->NewStringUTF(hello.c_str());
35+ return key;
36+ }
Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ private SC () {
5353 */
5454 public static native String sign (String key );
5555
56+ public static native String obfuscate (Context context , String key , String value );
57+
58+ public static native String deobfuscate (Context context , String key , String value );
59+
5660 public static void init (Context c ) {
5761 context = c ;
5862 if (!listeners .isEmpty ()) {
You can’t perform that action at this time.
0 commit comments