aboutsummaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/standalone/libs/jni/c_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cz/crcs/ectester/standalone/libs/jni/c_utils.h')
-rw-r--r--src/cz/crcs/ectester/standalone/libs/jni/c_utils.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/cz/crcs/ectester/standalone/libs/jni/c_utils.h b/src/cz/crcs/ectester/standalone/libs/jni/c_utils.h
index edd0bda..d925dfe 100644
--- a/src/cz/crcs/ectester/standalone/libs/jni/c_utils.h
+++ b/src/cz/crcs/ectester/standalone/libs/jni/c_utils.h
@@ -1,5 +1,10 @@
+#pragma once
+
#include "native.h"
+/**
+ * Classes that are accessed alot are cached here, manually.
+ */
extern jclass ec_parameter_spec_class;
extern jclass ecgen_parameter_spec_class;
extern jclass pubkey_class;
@@ -12,4 +17,12 @@ extern jclass point_class;
extern jclass biginteger_class;
extern jclass illegal_state_exception_class;
-void init_classes(JNIEnv *env, const char* lib_name); \ No newline at end of file
+/**
+ * Initialize the classes.
+ */
+void init_classes(JNIEnv *env, const char* lib_name);
+
+/**
+ * Throw a new exception of class with message.
+ */
+void throw_new(JNIEnv *env, const char *class, const char *message); \ No newline at end of file