mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-23 20:42:06 +01:00
Fix rebase errors
This commit is contained in:
parent
85171ee71b
commit
0530449e7e
3 changed files with 4 additions and 17 deletions
|
@ -30,8 +30,6 @@ import org.jivesoftware.smackx.omemo.internal.OmemoDevice;
|
|||
import org.jivesoftware.smackx.omemo.trust.OmemoFingerprint;
|
||||
import org.jivesoftware.smackx.omemo.util.OmemoKeyUtil;
|
||||
|
||||
import org.jxmpp.jid.impl.JidCreate;
|
||||
import org.jxmpp.stringprep.XmppStringprepException;
|
||||
import org.whispersystems.libsignal.IdentityKey;
|
||||
import org.whispersystems.libsignal.IdentityKeyPair;
|
||||
import org.whispersystems.libsignal.InvalidKeyException;
|
||||
|
@ -221,16 +219,4 @@ public class SignalOmemoKeyUtil extends OmemoKeyUtil<IdentityKeyPair, IdentityKe
|
|||
}
|
||||
return getFingerprintOfIdentityKey(identityKeyPair.getPublicKey());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SignalProtocolAddress omemoDeviceAsAddress(OmemoDevice contact) {
|
||||
return new SignalProtocolAddress(contact.getJid().asBareJid().toString(), contact.getDeviceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public OmemoDevice addressAsOmemoDevice(SignalProtocolAddress address)
|
||||
throws XmppStringprepException
|
||||
{
|
||||
return new OmemoDevice(JidCreate.bareFrom(address.getName()), address.getDeviceId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class OmemoFingerprint implements CharSequence {
|
|||
public String blocksOf8Chars() {
|
||||
StringBuilder pretty = new StringBuilder();
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (i != 0) pretty.append(" ");
|
||||
if (i != 0) pretty.append(' ');
|
||||
pretty.append(this.fingerprintString.substring(8 * i, 8 * (i + 1)));
|
||||
}
|
||||
return pretty.toString();
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.jivesoftware.smackx.omemo.element.OmemoBundleVAxolotlElement;
|
|||
import org.jivesoftware.smackx.omemo.exceptions.CorruptedOmemoKeyException;
|
||||
import org.jivesoftware.smackx.omemo.internal.OmemoDevice;
|
||||
import org.jivesoftware.smackx.omemo.provider.OmemoBundleVAxolotlProvider;
|
||||
import org.jivesoftware.smackx.omemo.trust.OmemoFingerprint;
|
||||
import org.jivesoftware.smackx.omemo.util.OmemoKeyUtil;
|
||||
|
||||
import org.junit.Test;
|
||||
|
@ -127,8 +128,8 @@ extends SmackTestSuite {
|
|||
|
||||
@Test
|
||||
public void testPrettyFingerprint() {
|
||||
String ugly = "FFFFFFFFEEEEEEEEDDDDDDDDCCCCCCCCBBBBBBBBAAAAAAAA9999999988888888";
|
||||
String pretty = OmemoKeyUtil.prettyFingerprint(ugly);
|
||||
OmemoFingerprint fingerprint = new OmemoFingerprint("FFFFFFFFEEEEEEEEDDDDDDDDCCCCCCCCBBBBBBBBAAAAAAAA9999999988888888");
|
||||
String pretty = fingerprint.blocksOf8Chars();
|
||||
assertEquals(pretty, "FFFFFFFF EEEEEEEE DDDDDDDD CCCCCCCC BBBBBBBB AAAAAAAA 99999999 88888888");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue