Beispiel #1
0
 FingerPrint findFingerPrint(byte[] fingerprint, boolean add, OTRCallbacks callback) {
   String key = new String(fingerprint);
   FingerPrint ret = (FingerPrint) fingerprintTable.get(key);
   if (ret != null) return ret;
   if (!add) return null;
   ret = new FingerPrint();
   ret.fingerPrint = new byte[fingerprint.length];
   System.arraycopy(fingerprint, 0, ret.fingerPrint, 0, fingerprint.length);
   ret.context = this;
   fingerprintTable.put(key, ret);
   /* Inform the user of the new fingerprint */
   callback.newFingerprint(us, accountName, key, recName, ret.fingerPrint);
   /* Arrange that the new fingerprint be written to disk */
   callback.writeFingerprints();
   return ret;
 }