klaxit / hidden-secrets-gradle-plugin

🔒 Deeply hide secrets on Android
MIT License
395 stars 40 forks source link

unable to make this repo work #19

Closed kuabhish closed 3 years ago

kuabhish commented 3 years ago

I had this issue. So i thought i will edit the secrets.cpp. So i changed the function:

extern "C"
JNIEXPORT jstring JNICALL
Java_YOUR_PACKAGE_GOES_HERE_Secrets_getYOUR_KEY_NAME_GOES_HERE(
        JNIEnv *pEnv,
        jobject pThis,
        jstring packageName) {
    char obfuscatedSecret[] = {"lifeisgood2"}; // added 
    return getOriginalKey(obfuscatedSecret, sizeof(obfuscatedSecret), packageName, pEnv);
}

This line is returning a value in some random format

        final String key = new Secrets().getYourSecretKeyName(getPackageName());
        System.out.println(key);

What should I do to make it work?

ben-j69 commented 3 years ago

The other issue you had is not related with c or kotlin code. The code your are editing is wrong and does not follow how the plugin works. First you need to integrate the plug-in I can help you in the other issue so I will close this one.