Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
Fix compiler errors
Browse files Browse the repository at this point in the history
  • Loading branch information
matsjj committed Oct 27, 2020
1 parent a4eb52d commit 3cc9102
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions jni/cpp/Random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// file LICENSE at the root of the source code distribution tree.

#include <jni.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>

static JavaVM* cachedJVM;
Expand All @@ -26,8 +28,10 @@ uint32_t random32() {
}

void random_buffer(uint8_t *buf, size_t len) {
JNIEnv *env;
cachedJVM->AttachCurrentThread(&env, NULL);
void *env_ptr;
cachedJVM->AttachCurrentThread(&env_ptr, NULL);

JNIEnv *env = (JNIEnv *) env_ptr;

// SecureRandom random = new SecureRandom();
jclass secureRandomClass = env->FindClass("java/security/SecureRandom");
Expand Down

0 comments on commit 3cc9102

Please sign in to comment.