JniTest.java 550 Bytes
Newer Older
Yann Garcia's avatar
Yann Garcia committed
package com.spirent.its.security;

class JniTest
{
    static {
        System.loadLibrary("com_spirent_its_security.dll");
    }

    public static void main(String args[])
    {
        System.out.println("Hello, World");
        byte[] toBeHashed = new byte[] { (byte)0xca, (byte)0xfe, (byte)0xde, (byte)0xca };
        byte[] hashedData = NativeSecurity.getInstance().hashWithSha256(toBeHashed);
        if (hashedData == null) {
          System.err.println("Failed");
        } else {
          System.out.println("Succeed");
        }
    }
}