public static boolean verify(byte[] data,byte[] signature,byte[] pub){
  Preconditions.checkArgument(data.length == 32 && signature.length <= 520 && pub.length <= 520);
  ByteBuffer byteBuff=nativeECDSABuffer.get();
  if (byteBuff == null) {
    byteBuff=ByteBuffer.allocateDirect(32 + 8 + 520+ 520);
    byteBuff.order(ByteOrder.nativeOrder());
    nativeECDSABuffer.set(byteBuff);
  }
  byteBuff.rewind();
  byteBuff.put(data);
  byteBuff.putInt(signature.length);
  byteBuff.putInt(pub.length);
  byteBuff.put(signature);
  byteBuff.put(pub);
  return secp256k1_ecdsa_verify(byteBuff) == 1;
}

public static boolean verify ( byte [ ] data , byte [ ] signature , byte [ ] pub ) { Preconditions . checkArgument ( data . length == 32 && signature . length <= 520 && pub . length <= 520 ) ; ByteBuffer byteBuff = nativeECDSABuffer . get ( ) ; if ( byteBuff == null ) { byteBuff = ByteBuffer . allocateDirect ( 32 + 8 + 520 + 520 ) ; byteBuff . order ( ByteOrder . nativeOrder ( ) ) ; nativeECDSABuffer . set ( byteBuff ) ; } byteBuff . rewind ( ) ; byteBuff . put ( data ) ; byteBuff . putInt ( signature . length ) ; byteBuff . putInt ( pub . length ) ; byteBuff . put ( signature ) ; byteBuff . put ( pub ) ; return secp256k1_ecdsa_verify ( byteBuff ) == 1 ; }
verifies the given secp256k1 signature in native code . calling when enabled = = false is undefined ( probably library not loaded )
