aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--java-c-jni/SHA3.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/java-c-jni/SHA3.java b/java-c-jni/SHA3.java
index 3d5ce2a..afcb942 100644
--- a/java-c-jni/SHA3.java
+++ b/java-c-jni/SHA3.java
@@ -16,6 +16,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+import java.io.*;
+import java.util.*;
/**
@@ -40,7 +42,14 @@ public class SHA3
*/
static
{
- System.loadLibrary("SHA3");
+ try
+ {
+ System.load((new File("./SHA3.so")).getCanonicalPath());
+ }
+ catch (IOException err)
+ {
+ throw new Error("SHA3 library cannot be found");
+ }
}
@@ -104,3 +113,4 @@ public class SHA3
public static native byte[] digest(byte[] msg, int msglen);
}
+