Determine if the start of the buffer matches a fingerprint byte array.

@param buffer bytes from file
@param fingerprint fingerprint bytes
@return true if the file matches the fingerprint
509136
private boolean matchesFingerprint(byte[] buffer, byte[] fingerprint)
   {
      return Arrays.equals(fingerprint, Arrays.copyOf(buffer, fingerprint.length));
   }
305617
public Fingerprint fingerprintSuccessColor(int fingerprintSuccess) {
        this.fingerprintSuccess = fingerprintSuccess;
        this.fingerprintImageView.setBackgroundTintList(ColorStateList.valueOf(getContext().getColor(fingerprintSuccess)));
        return this;
    }
1248664
public boolean startsWith(Bytes prefix) {
    Objects.requireNonNull(prefix, "startWith(Bytes prefix) cannot have null parameter");

    if (prefix.length > this.length) {
      return false;
    } else {
      int end = this.offset + prefix.length;
      for (int i = this.offset, j = prefix.offset; i < end; i++, j++) {
        if (this.data[i] != prefix.data[j]) {
          return false;
        }
      }
    }
    return true;
  }
92788
public static LinkedBuffer use(byte[] buffer, int start)
    {
        assert start >= 0;
        if (buffer.length - start < MIN_BUFFER_SIZE)
            throw new IllegalArgumentException(MIN_BUFFER_SIZE + " is the minimum buffer size.");

        return new LinkedBuffer(buffer, start, start);
    }
1242112
public boolean matchMetadata(Fingerprint fp) {
    for (Tag tag : METADATA_TAGS) {
      if (!getTag(tag).equals(fp.getTag(tag))) {
        return false;
      }
    }
    return true;
  }
617663
def has_fingerprint_dlog(self, modulus):
        
        if not self.is_acceptable_modulus(modulus):
            return False

        self.tested += 1
        positive = self.dlog_fprinter.fprint(modulus)

        if positive:
            self.found += 1

        return positive
410363
public EventBuilder withFingerprint(String... fingerprint) {
        List<String> list = new ArrayList<>(fingerprint.length);
        Collections.addAll(list, fingerprint);
        event.setFingerprint(list);
        return this;
    }
166693
private static boolean checkBegin(
		BinaryString pattern, MemorySegment[] segments, int start, int len) {
		int lenSub = pattern.getSizeInBytes();
		return len >= lenSub &&
				SegmentsUtil.equals(pattern.getSegments(), 0, segments, start, lenSub);
	}
1316751
private String matchPatternInBuffer(Pattern pattern) {
        matchValid = false;
        matcher.usePattern(pattern);
        matcher.region(position, buf.limit());
        if (matcher.lookingAt()) {
            if (matcher.hitEnd() && (!sourceClosed)) {
                // Get more input and try again
                needInput = true;
                return null;
            }
            position = matcher.end();
            return matcher.group();
        }

        if (sourceClosed)
            return null;

        // Read more to find pattern
        needInput = true;
        return null;
    }
10427
public function verify(Message $message, string $fingerprint): bool
    {
        $gnupg = new \Crypt_GPG($this->options);
        $gnupg->addSignKey($fingerprint);

        /**
         * @var \Crypt_GPG_Signature[] $verified
         */
        try {
            $verified = $gnupg->verify($message->getBodyText());
            /**
             * @var \Crypt_GPG_Signature $sig
             */
            foreach ($verified as $sig) {
                if ($sig->isValid()) {
                    return true;
                }
            }
            return false;
        } catch (\PEAR_Exception $ex) {
            throw new GPGMailerException(
                'An error occurred trying to verify this message: ' .
                    $ex->getMessage(),
                $ex->getCode(),
                $ex
            );
        }
    }
401853
protected boolean checkSortKeyInBufferRange(BaseRow sortKey, TopNBuffer buffer) {
		Comparator<BaseRow> comparator = buffer.getSortKeyComparator();
		Map.Entry<BaseRow, Collection<BaseRow>> worstEntry = buffer.lastEntry();
		if (worstEntry == null) {
			// return true if the buffer is empty.
			return true;
		} else {
			BaseRow worstKey = worstEntry.getKey();
			int compare = comparator.compare(sortKey, worstKey);
			if (compare < 0) {
				return true;
			} else {
				return buffer.getCurrentTopNum() < getDefaultTopNSize();
			}
		}
	}
958559
private boolean verifyFingreprint() {

        try {
            PackageInfo info = context
                    .getPackageManager()
                    .getPackageInfo(NOKIA_INSTALLER, PackageManager.GET_SIGNATURES);

            if (info.signatures.length == 1) {
                byte[] cert = info.signatures[0].toByteArray();
                MessageDigest digest;
                digest = MessageDigest.getInstance("SHA1");
                byte[] ENABLER_FINGERPRINT = digest.digest(cert);
                byte[] EXPECTED_FINGERPRINT = hexStringToByteArray(EXPECTED_SHA1_FINGERPRINT);

                if (Arrays.equals(ENABLER_FINGERPRINT, EXPECTED_FINGERPRINT)) {
                    Logger.i("isBillingAvailable", "NIAP signature verified");
                    return true;
                }
            }
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        } catch (PackageManager.NameNotFoundException e) {
            e.printStackTrace();
        }
        return false;
    }
1272142
public static boolean startsWith(byte[] bytes, byte[] prefix) {
    return bytes != null && prefix != null &&
        bytes.length >= prefix.length &&
        LexicographicalComparerHolder.BEST_COMPARER.
        compareTo(bytes, 0, prefix.length, prefix, 0, prefix.length) == 0;
  }
497976
public static boolean compact(ByteBuffer buffer) {
        if (buffer.position() == 0)
            return false;
        boolean full = buffer.limit() == buffer.capacity();
        buffer.compact().flip();
        return full && buffer.limit() < buffer.capacity();
    }
848466
protected static boolean __has_identifier(ByteBuffer bb, String ident) {
    if (ident.length() != FILE_IDENTIFIER_LENGTH)
        throw new AssertionError("FlatBuffers: file identifier must be length " +
                                 FILE_IDENTIFIER_LENGTH);
    for (int i = 0; i < FILE_IDENTIFIER_LENGTH; i++) {
      if (ident.charAt(i) != (char)bb.get(bb.position() + SIZEOF_INT + i)) return false;
    }
    return true;
  }
177885
def compute_fingerprint(self, target):
    
    if isinstance(target, UnpackedJars):
      hasher = sha1()
      for cache_key in sorted(jar.cache_key() for jar in target.all_imported_jar_deps):
        hasher.update(cache_key.encode('utf-8'))
      hasher.update(target.payload.fingerprint().encode('utf-8'))
      return hasher.hexdigest() if PY3 else hasher.hexdigest().decode('utf-8')
    return None
537307
public boolean isMatch(InetAddress inetAddress)
  {
    byte []bytes = inetAddress.getAddress();

    if (bytes.length != _address.length)
      return false;

    for (int i = 0; i < bytes.length; i++) {
      if (bytes[i] == _address[i]) {
      }
      else if (_subnetByte < i) {
        return true;
      }
      else if (i == _subnetByte) {
        return (bytes[i] & _subnetMask) == (_address[i] & _subnetMask);
      }
      else {
        return false;
      }
    }

    return true;
  }