mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 01:29:38 +02:00
Simplfiy OmemoKeyUtil generics
This commit is contained in:
parent
b0acf0bcc3
commit
4e5cf82795
9 changed files with 14 additions and 24 deletions
|
@ -55,8 +55,7 @@ public class SignalFileBasedOmemoStore
|
|||
}
|
||||
|
||||
@Override
|
||||
public OmemoKeyUtil<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord, SessionRecord,
|
||||
SignalProtocolAddress, ECPublicKey, PreKeyBundle, SessionCipher> keyUtil()
|
||||
public OmemoKeyUtil<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord, SessionRecord, ECPublicKey, PreKeyBundle> keyUtil()
|
||||
{
|
||||
return new SignalOmemoKeyUtil();
|
||||
}
|
||||
|
|
|
@ -33,8 +33,6 @@ import org.jivesoftware.smackx.omemo.util.OmemoKeyUtil;
|
|||
import org.whispersystems.libsignal.IdentityKey;
|
||||
import org.whispersystems.libsignal.IdentityKeyPair;
|
||||
import org.whispersystems.libsignal.InvalidKeyException;
|
||||
import org.whispersystems.libsignal.SessionCipher;
|
||||
import org.whispersystems.libsignal.SignalProtocolAddress;
|
||||
import org.whispersystems.libsignal.ecc.Curve;
|
||||
import org.whispersystems.libsignal.ecc.ECPublicKey;
|
||||
import org.whispersystems.libsignal.state.PreKeyBundle;
|
||||
|
@ -49,7 +47,7 @@ import org.whispersystems.libsignal.util.KeyHelper;
|
|||
* @author Paul Schaub
|
||||
*/
|
||||
public class SignalOmemoKeyUtil extends OmemoKeyUtil<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord,
|
||||
SessionRecord, SignalProtocolAddress, ECPublicKey, PreKeyBundle, SessionCipher>
|
||||
SessionRecord, ECPublicKey, PreKeyBundle>
|
||||
{
|
||||
@Override
|
||||
public IdentityKeyPair generateOmemoIdentityKeyPair() {
|
||||
|
|
|
@ -46,8 +46,7 @@ public abstract class SignalOmemoStore
|
|||
private final SignalOmemoKeyUtil signalKeyUtil = new SignalOmemoKeyUtil();
|
||||
|
||||
@Override
|
||||
public OmemoKeyUtil<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord, SessionRecord,
|
||||
SignalProtocolAddress, ECPublicKey, PreKeyBundle, SessionCipher> keyUtil() {
|
||||
public OmemoKeyUtil<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord, SessionRecord, ECPublicKey, PreKeyBundle> keyUtil() {
|
||||
return signalKeyUtil;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,8 +31,6 @@ import org.junit.runner.RunWith;
|
|||
import org.junit.runners.Parameterized;
|
||||
import org.whispersystems.libsignal.IdentityKey;
|
||||
import org.whispersystems.libsignal.IdentityKeyPair;
|
||||
import org.whispersystems.libsignal.SessionCipher;
|
||||
import org.whispersystems.libsignal.SignalProtocolAddress;
|
||||
import org.whispersystems.libsignal.ecc.ECPublicKey;
|
||||
import org.whispersystems.libsignal.state.PreKeyBundle;
|
||||
import org.whispersystems.libsignal.state.PreKeyRecord;
|
||||
|
@ -46,10 +44,9 @@ import org.whispersystems.libsignal.state.SignedPreKeyRecord;
|
|||
*/
|
||||
@RunWith(value = Parameterized.class)
|
||||
public class SignalOmemoKeyUtilTest
|
||||
extends OmemoKeyUtilTest<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord, SessionRecord,
|
||||
SignalProtocolAddress, ECPublicKey, PreKeyBundle, SessionCipher> {
|
||||
extends OmemoKeyUtilTest<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord, SessionRecord, ECPublicKey, PreKeyBundle> {
|
||||
|
||||
public SignalOmemoKeyUtilTest(OmemoKeyUtil<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord, SessionRecord, SignalProtocolAddress, ECPublicKey, PreKeyBundle, SessionCipher> keyUtil) {
|
||||
public SignalOmemoKeyUtilTest(OmemoKeyUtil<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord, SessionRecord, ECPublicKey, PreKeyBundle> keyUtil) {
|
||||
super(keyUtil);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue