我不知道为什么下面的代码会返回“Hello native!Th”而不是“Hello native!This is from jni load!\n”,有人可以提示一下吗?
#include "helloJNI.h"
#include "openssl/aes.h"
#define LEN 1024
jstring jni_text(JNIEnv *env, jclass clz)
{
AES_KEY aesKey;
int result;
const char origin[] = "Hello native! This is from jni load!\n";
char out[LEN];
char outout[LEN];
memset(out, '\0', sizeof(out));
memset(outout, '\0', sizeof(outout));
result = AES_set_encrypt_key((const unsigned char *)"abc123", 256, &aesKey);
LOGE("encypt key result %d\n", result); /* is 0 */
AES_encrypt((const unsigned char *)origin, (unsigned char *)out, &aesKey);
LOGE("after encrypt, chars is %s\n", out);
result = AES_set_decrypt_key((const unsigned …Run Code Online (Sandbox Code Playgroud)