code: public static boolean verify(byte[] data, byte[] signature, byte[] pub) throws SignatureDecodeException {
          if (Secp256k1Context.isEnabled()) {
              try {
                  return NativeSecp256k1.verify(data, signature, pub);
              } catch (NativeSecp256k1Util.AssertFailException e) {
                  log.error("Caught AssertFailException inside secp256k1", e);
                  return false;
              }
          }
          return verify(data, ECDSASignature.decodeFromDER(signature), pub);
      }
docs: Verifies the given ASN.1 encoded ECDSA signature against a hash using the public key.
  
  @param data      Hash of the data to verify.
  @param signature ASN.1 encoded signature.
  @param pub       The public key bytes to use.
  @throws SignatureDecodeException if the signature is unparseable in some way.