summaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/standalone/libs/jni/c_utils.h
diff options
context:
space:
mode:
authorJ08nY2018-01-23 17:31:15 +0100
committerJ08nY2018-01-23 17:31:15 +0100
commitcb6c6b8b1274fe5a340c4317a4b015ea0ef15396 (patch)
tree864a54dcdf07da33cd139312c8b0ee693e1a0eff /src/cz/crcs/ectester/standalone/libs/jni/c_utils.h
parent6c46a27a52854aee24f7a37e74002bd6f4485723 (diff)
parentc581e39e539e6dadb49d9f83f563ab2b375f6e0b (diff)
downloadECTester-0.2.0.tar.gz
ECTester-0.2.0.tar.zst
ECTester-0.2.0.zip
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.h28
1 files changed, 28 insertions, 0 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
new file mode 100644
index 0000000..d925dfe
--- /dev/null
+++ b/src/cz/crcs/ectester/standalone/libs/jni/c_utils.h
@@ -0,0 +1,28 @@
+#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;
+extern jclass privkey_class;
+extern jclass keypair_class;
+extern jclass elliptic_curve_class;
+extern jclass fp_field_class;
+extern jclass f2m_field_class;
+extern jclass point_class;
+extern jclass biginteger_class;
+extern jclass illegal_state_exception_class;
+
+/**
+ * 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