public static boolean secKeyVerify(byte[] seckey){
  Preconditions.checkArgument(seckey.length == 32);
  ByteBuffer byteBuff=nativeECDSABuffer.get();
  if (byteBuff == null || byteBuff.capacity() < seckey.length) {
    byteBuff=ByteBuffer.allocateDirect(seckey.length);
    byteBuff.order(ByteOrder.nativeOrder());
    nativeECDSABuffer.set(byteBuff);
  }
  byteBuff.rewind();
  byteBuff.put(seckey);
  r.lock();
  try {
    return secp256k1_ec_seckey_verify(byteBuff,Secp256k1Context.getContext()) == 1;
  }
  finally {
    r.unlock();
  }
}

public static boolean secKeyVerify ( byte [ ] seckey ) { Preconditions . checkArgument ( seckey . length == 32 ) ; ByteBuffer byteBuff = nativeECDSABuffer . get ( ) ; if ( byteBuff == null || byteBuff . capacity ( ) < seckey . length ) { byteBuff = ByteBuffer . allocateDirect ( seckey . length ) ; byteBuff . order ( ByteOrder . nativeOrder ( ) ) ; nativeECDSABuffer . set ( byteBuff ) ; } byteBuff . rewind ( ) ; byteBuff . put ( seckey ) ; r . lock ( ) ; try { return secp256k1_ec_seckey_verify ( byteBuff , Secp256k1Context . getContext ( ) ) == 1 ; } finally { r . unlock ( ) ; } }
libsecp256k1 seckey verify - returns 1 if valid , 0 if invalid
