예제 #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;
 }
예제 #2
0
 /* Set the trust level based on the result of the SMP */
 void setSmpTrust(OTRCallbacks callback, boolean trusted) {
   this.activeFingerprint.trust = trusted ? "smp" : "";
   /* Write the new info to disk, redraw the ui, and redraw the
    * OTR buttons. */
   callback.writeFingerprints();
 }