Smack/smack-omemo-signal/src/main/java/org/jivesoftware/smackx/omemo/signal/SignalChainKeyIndexStalenes...

52 lines
2.3 KiB
Java

/**
*
* Copyright 2019 Paul Schaub
*
* This file is part of smack-omemo-signal.
*
* smack-omemo-signal is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.jivesoftware.smackx.omemo.signal;
import org.jivesoftware.smackx.omemo.OmemoStore;
import org.jivesoftware.smackx.omemo.util.ChainKeyIndexStalenessStrategy;
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;
import org.whispersystems.libsignal.state.SessionRecord;
import org.whispersystems.libsignal.state.SignedPreKeyRecord;
public class SignalChainKeyIndexStalenessStrategy extends ChainKeyIndexStalenessStrategy<IdentityKeyPair, IdentityKey,
PreKeyRecord, SignedPreKeyRecord, SessionRecord, SignalProtocolAddress, ECPublicKey, PreKeyBundle, SessionCipher> {
/**
* Create a new {@link SignalChainKeyIndexStalenessStrategy}.
*
* @param store {@link OmemoStore} from which we can read the devices {@link SessionRecord}.
* @param maxChainKeyIndex the maximum value of messages we are allowed to send to the device unanswered before
*/
public SignalChainKeyIndexStalenessStrategy(
OmemoStore<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord, SessionRecord,
SignalProtocolAddress, ECPublicKey, PreKeyBundle, SessionCipher> store,
int maxChainKeyIndex) {
super(store, maxChainKeyIndex);
}
}