kopia lustrzana https://github.com/ryukoposting/Signal-Android
57 wiersze
1.9 KiB
Java
57 wiersze
1.9 KiB
Java
/**
|
|
* Copyright (C) 2014 Open Whisper Systems
|
|
*
|
|
* This program 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, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
package org.whispersystems.textsecure.internal.push;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import com.fasterxml.jackson.core.JsonGenerator;
|
|
import com.fasterxml.jackson.core.JsonParser;
|
|
import com.fasterxml.jackson.databind.DeserializationContext;
|
|
import com.fasterxml.jackson.databind.JsonDeserializer;
|
|
import com.fasterxml.jackson.databind.JsonSerializer;
|
|
import com.fasterxml.jackson.databind.SerializerProvider;
|
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|
|
|
import org.whispersystems.libaxolotl.IdentityKey;
|
|
import org.whispersystems.libaxolotl.InvalidKeyException;
|
|
import org.whispersystems.textsecure.internal.util.Base64;
|
|
import org.whispersystems.textsecure.internal.util.JsonUtil;
|
|
|
|
import java.io.IOException;
|
|
import java.util.List;
|
|
|
|
public class PreKeyResponse {
|
|
|
|
@JsonProperty
|
|
@JsonSerialize(using = JsonUtil.IdentityKeySerializer.class)
|
|
@JsonDeserialize(using = JsonUtil.IdentityKeyDeserializer.class)
|
|
private IdentityKey identityKey;
|
|
|
|
@JsonProperty
|
|
private List<PreKeyResponseItem> devices;
|
|
|
|
public IdentityKey getIdentityKey() {
|
|
return identityKey;
|
|
}
|
|
|
|
public List<PreKeyResponseItem> getDevices() {
|
|
return devices;
|
|
}
|
|
|
|
|
|
}
|