docs: public static byte[] createECDHSecret(byte[] seckey, byte[] pubkey) throws AssertFailException {
          Preconditions.checkArgument(seckey.length <= 32 && pubkey.length <= 65);
  
          ByteBuffer byteBuff = nativeECDSABuffer.get();
          if (byteBuff == null || byteBuff.capacity() < 32 + pubkey.length) {
              byteBuff = ByteBuffer.allocateDirect(32 + pubkey.length);
              byteBuff.order(ByteOrder.nativeOrder());
              nativeECDSABuffer.set(byteBuff);
          }
          byteBuff.rewind();
          byteBuff.put(seckey);
          byteBuff.put(pubkey);
  
          byte[][] retByteArray;
          r.lock();
          try {
              retByteArray = secp256k1_ecdh(byteBuff, Secp256k1Context.getContext(), pubkey.length);
          } finally {
              r.unlock();
          }
  
          byte[] resArr = retByteArray[0];
          int retVal = new BigInteger(new byte[] { retByteArray[1][0] }).intValue();
  
          assertEquals(resArr.length, 32, "Got bad result length.");
          assertEquals(retVal, 1, "Failed return value check.");
  
          return resArr;
      }