Trust that a fingerprint belongs to an OmemoDevice.
The fingerprint must be the lowercase, hexadecimal fingerprint of the identityKey of the device and must
be of length 64.

@param device device
@param fingerprint fingerprint
345309
public void trustOmemoIdentity(OmemoDevice device, OmemoFingerprint fingerprint) {
        if (trustCallback == null) {
            throw new IllegalStateException("No TrustCallback set.");
        }

        trustCallback.setTrust(device, fingerprint, TrustState.trusted);
    }
1188743
def _compute_fingerprint(key):
    
    n = TLObject.serialize_bytes(get_byte_array(key.n))
    e = TLObject.serialize_bytes(get_byte_array(key.e))
    # Telegram uses the last 8 bytes as the fingerprint
    return struct.unpack('<q', sha1(n + e).digest()[-8:])[0]
498310
public void setDeviceId(byte[] deviceId) {
    if (deviceId == null) {
      throw new RuntimeException("Device ID cannot be null.");
    }
    if (deviceId.length != DEVICE_ID_SIZE) {
      throw new RuntimeException(String.format(
          "Device ID must be %d bytes long.", Integer.valueOf(DEVICE_ID_SIZE)));
    }
    this.deviceId = deviceId;
  }
618496
protected function keyExistsByFingerprint($fingerprint)
    {
        foreach ($this->api()->getClient()->getSshKeys() as $existingKey) {
            if ($existingKey->fingerprint === $fingerprint) {
                return true;
            }
        }

        return false;
    }
1083215
public static Fingerprint fingerprint(byte[] bytes) {
        Fingerprint fingerprint = new Fingerprint();
        for (Algorithms algorithm : VictimsConfig.algorithms()) {
            try {
                MessageDigest md = MessageDigest.getInstance(algorithm
                        .toString().toUpperCase());
                fingerprint.put(algorithm,
                        new String(Hex.encodeHex(md.digest(bytes))));
            } catch (NoSuchAlgorithmException e) {
                // Do nothing just skip
            }
        }
        return fingerprint;
    }
1342944
public static String createFingerprint(Class cl, Method m) {
		return FingerprintGenerator.fingerprint(cl, m);
	}
410363
public EventBuilder withFingerprint(String... fingerprint) {
        List<String> list = new ArrayList<>(fingerprint.length);
        Collections.addAll(list, fingerprint);
        event.setFingerprint(list);
        return this;
    }
119113
private KeyCache<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey, T_Sess> getCache(OmemoDevice device) {
        KeyCache<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey, T_Sess> cache = caches.get(device);
        if (cache == null) {
            cache = new KeyCache<>();
            caches.put(device, cache);
        }
        return cache;
    }
717885
public static boolean isAvailable(Context context){
        FingerprintManager manager = (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE);
        return (manager!=null && manager.isHardwareDetected() && manager.hasEnrolledFingerprints());
    }
421053
public FingerprintDialog tryLimit(int limit, final FailAuthCounterDialogCallback counterCallback){
        this.fingerprint.tryLimit(limit, new FailAuthCounterCallback() {
            @Override
            public void onTryLimitReached(Fingerprint fingerprint) {
                counterCallback.onTryLimitReached(FingerprintDialog.this);
            }
        });
        return this;
    }
1053836
private int getCacheKey(InputDevice device, GVRControllerType controllerType) {
        if (controllerType != GVRControllerType.UNKNOWN &&
            controllerType != GVRControllerType.EXTERNAL) {
            // Sometimes a device shows up using two device ids
            // here we try to show both devices as one using the
            // product and vendor id

            int key = device.getVendorId();
            key = 31 * key + device.getProductId();
            key = 31 * key + controllerType.hashCode();

            return key;
        }
        return -1; // invalid key
    }
25408
function (deviceIdentifier, identifierUrn) {
      var path;
      if (deviceIdentifier && identifierUrn) {
        path = this.constructPath(constants.DEVICES, deviceIdentifier, constants.IDENTIFIERS, identifierUrn);
        return this.Core.DELETE(path);
      } else {
        return this.rejectRequest('Bad Request: A device identifier and an identifier id are required.');
      }
    }
1026137
function fingerprint(key) {
    assert.equal('string', typeof key, 'typeof ssh_key');

    var pieces = key.split(' ');
    if (!pieces || !pieces.length || pieces.length < 2)
      throw new Error('invalid ssh key');

    var data = new Buffer(pieces[1], 'base64');

    var hash = crypto.createHash('md5');
    hash.update(data);
    var digest = hash.digest('hex');

    var fp = '';
    for (var i = 0; i < digest.length; i++) {
      if (i && i % 2 === 0)
        fp += ':';

      fp += digest[i];
    }

    return fp;
  }
1242112
public boolean matchMetadata(Fingerprint fp) {
    for (Tag tag : METADATA_TAGS) {
      if (!getTag(tag).equals(fp.getTag(tag))) {
        return false;
      }
    }
    return true;
  }
1306677
private void addObjectIdentity(final Object object) {

        if (object == null) {
            _buffer.append("null");
        } else {
            _buffer.append(object.getClass().getName());
            _buffer.append("@");
            _buffer
                    .append(Integer
                            .toHexString(System.identityHashCode(object)));
        }

    }
780136
def fingerprint type=DEFAULT_FINGERPRINT
      core_fp = core.fingerprint type
      coating_fp = coating.collect{|c| c.fingerprint type}.flatten.uniq.compact
      (core_fp.empty? or coating_fp.empty?) ? [] : (core_fp+coating_fp).uniq.compact
    end
471700
function (identifier)  {
    var path;
    if (identifier) {
      path = this.constructPath(constants.DEVICES, identifier);
      return this.Core.DELETE(path);
    } else {
      return this.rejectRequest('Bad Request: A device identifier is required.');
    }
  }