112 lines
3.4 KiB
Java
112 lines
3.4 KiB
Java
package org.jmrtd.protocol;
|
|
|
|
import java.io.Serializable;
|
|
import java.security.PublicKey;
|
|
import java.util.Arrays;
|
|
import o.ghS;
|
|
import org.jmrtd.Util;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public class AAResult implements Serializable {
|
|
private static final long serialVersionUID = 8800803919646625713L;
|
|
private byte[] challenge;
|
|
private String digestAlgorithm;
|
|
private PublicKey publicKey;
|
|
private byte[] response;
|
|
private String signatureAlgorithm;
|
|
|
|
public AAResult(PublicKey publicKey, String str, String str2, byte[] bArr, byte[] bArr2) {
|
|
this.publicKey = publicKey;
|
|
this.digestAlgorithm = str;
|
|
this.signatureAlgorithm = str2;
|
|
this.challenge = bArr;
|
|
this.response = bArr2;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder("AAResult [publicKey: ");
|
|
sb.append(Util.getDetailedPublicKeyAlgorithm(this.publicKey));
|
|
sb.append(", digestAlgorithm: ");
|
|
sb.append(this.digestAlgorithm);
|
|
sb.append(", signatureAlgorithm: ");
|
|
sb.append(this.signatureAlgorithm);
|
|
sb.append(", challenge: ");
|
|
sb.append(ghS.c(this.challenge));
|
|
sb.append(", response: ");
|
|
sb.append(ghS.c(this.response));
|
|
return sb.toString();
|
|
}
|
|
|
|
public int hashCode() {
|
|
int hashCode = Arrays.hashCode(this.challenge);
|
|
String str = this.digestAlgorithm;
|
|
int hashCode2 = str == null ? 0 : str.hashCode();
|
|
PublicKey publicKey = this.publicKey;
|
|
int hashCode3 = publicKey == null ? 0 : publicKey.hashCode();
|
|
int hashCode4 = Arrays.hashCode(this.response);
|
|
String str2 = this.signatureAlgorithm;
|
|
return ((((((((hashCode + 1303377669) * 1991) + hashCode2) * 1991) + hashCode3) * 1991) + hashCode4) * 1991) + (str2 != null ? str2.hashCode() : 0);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (obj == null || getClass() != obj.getClass()) {
|
|
return false;
|
|
}
|
|
AAResult aAResult = (AAResult) obj;
|
|
if (!Arrays.equals(this.challenge, aAResult.challenge)) {
|
|
return false;
|
|
}
|
|
String str = this.digestAlgorithm;
|
|
if (str == null) {
|
|
if (aAResult.digestAlgorithm != null) {
|
|
return false;
|
|
}
|
|
} else if (!str.equals(aAResult.digestAlgorithm)) {
|
|
return false;
|
|
}
|
|
PublicKey publicKey = this.publicKey;
|
|
if (publicKey == null) {
|
|
if (aAResult.publicKey != null) {
|
|
return false;
|
|
}
|
|
} else if (!publicKey.equals(aAResult.publicKey)) {
|
|
return false;
|
|
}
|
|
if (!Arrays.equals(this.response, aAResult.response)) {
|
|
return false;
|
|
}
|
|
String str2 = this.signatureAlgorithm;
|
|
if (str2 == null) {
|
|
if (aAResult.signatureAlgorithm != null) {
|
|
return false;
|
|
}
|
|
} else if (!str2.equals(aAResult.signatureAlgorithm)) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public String getSignatureAlgorithm() {
|
|
return this.signatureAlgorithm;
|
|
}
|
|
|
|
public byte[] getResponse() {
|
|
return this.response;
|
|
}
|
|
|
|
public PublicKey getPublicKey() {
|
|
return this.publicKey;
|
|
}
|
|
|
|
public String getDigestAlgorithm() {
|
|
return this.digestAlgorithm;
|
|
}
|
|
|
|
public byte[] getChallenge() {
|
|
return this.challenge;
|
|
}
|
|
}
|