code: public static boolean verify(byte[] data, ECDSASignature signature, byte[] pub) {
          ECDSASigner signer = new ECDSASigner();
          ECPublicKeyParameters params = new ECPublicKeyParameters(CURVE.getCurve().decodePoint(pub), CURVE);
          signer.init(false, params);
          try {
              return signer.verifySignature(data, signature.r, signature.s);
          } catch (NullPointerException npe) {
              // Bouncy Castle contains a bug that can cause NPEs given specially crafted
              // signatures.
              // Those signatures are inherently invalid/attack sigs so we just fail them here
              // rather than crash the thread.
              logger.error("Caught NPE inside bouncy castle", npe);
              return false;
          }
      }
docs: <p>
  Verifies the given ECDSA signature against the message bytes using the public
  key bytes.
  </p>
  
  <p>
  When using native ECDSA verification, data must be 32 bytes, and no element
  may be larger than 520 bytes.
  </p>
  
  @param data
  Hash of the data to verify.
  @param signature
  signature.
  @param pub
  The public key bytes to use.
  
  @return -