/** Publishes an email destination in the address directory. */ public void publishDestination(String destination, byte[] picture, String text) throws PasswordException, IOException, GeneralSecurityException, DhtException, InterruptedException { EmailIdentity identity = identities.get(destination); if (identity != null) { identity.setPicture(picture); identity.setText(text); if (identity.getFingerprint() == null) identity.generateFingerprint(); // if no fingerprint exists, generate one and save it in the next step identities.save(); Contact entry = new Contact(identity, identities, picture, text, identity.getFingerprint()); dht.store(entry); } }