2014-11-08 13:37:57 -08:00
|
|
|
package org.whispersystems.textsecure.api.crypto;
|
2014-02-16 15:23:49 -08:00
|
|
|
|
2014-04-21 08:40:19 -07:00
|
|
|
import org.whispersystems.libaxolotl.IdentityKey;
|
2014-02-16 15:23:49 -08:00
|
|
|
|
|
|
|
public class UntrustedIdentityException extends Exception {
|
|
|
|
|
|
|
|
private final IdentityKey identityKey;
|
2014-02-17 11:42:51 -08:00
|
|
|
private final String e164number;
|
2014-02-16 15:23:49 -08:00
|
|
|
|
2014-02-17 11:42:51 -08:00
|
|
|
public UntrustedIdentityException(String s, String e164number, IdentityKey identityKey) {
|
2014-02-16 15:23:49 -08:00
|
|
|
super(s);
|
2014-02-17 11:42:51 -08:00
|
|
|
this.e164number = e164number;
|
2014-02-16 15:23:49 -08:00
|
|
|
this.identityKey = identityKey;
|
|
|
|
}
|
|
|
|
|
2014-02-17 11:42:51 -08:00
|
|
|
public UntrustedIdentityException(UntrustedIdentityException e) {
|
|
|
|
this(e.getMessage(), e.getE164Number(), e.getIdentityKey());
|
|
|
|
}
|
|
|
|
|
2014-02-16 15:23:49 -08:00
|
|
|
public IdentityKey getIdentityKey() {
|
|
|
|
return identityKey;
|
|
|
|
}
|
2014-02-17 11:42:51 -08:00
|
|
|
|
|
|
|
public String getE164Number() {
|
|
|
|
return e164number;
|
|
|
|
}
|
|
|
|
|
2014-02-16 15:23:49 -08:00
|
|
|
}
|