Skip to content

Instantly share code, notes, and snippets.

@AliAzaz
Created July 7, 2021 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AliAzaz/1f854e1cbf17a52552e2c7549407c72f to your computer and use it in GitHub Desktop.
Save AliAzaz/1f854e1cbf17a52552e2c7549407c72f to your computer and use it in GitHub Desktop.
.cpp file to secure key
#include <jni.h>
#include <string>
extern "C"
JNIEXPORT jstring JNICALL
Java_edu_practice_utils_shared_Keys_apiKey(JNIEnv *env, jobject thiz) {
std::string api_key = "c527aa8fadcb58f1cccef75e3a64a3ae";
return env->NewStringUTF(api_key.c_str());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment