what-the-bank/sources/org/bouncycastle/util/io/pem/PemHeader.java

50 lines
1.1 KiB
Java

package org.bouncycastle.util.io.pem;
/* loaded from: classes6.dex */
public class PemHeader {
private String name;
private String value;
public int hashCode() {
return getHashCode(this.name) + (getHashCode(this.value) * 31);
}
public String getValue() {
return this.value;
}
public String getName() {
return this.name;
}
public boolean equals(Object obj) {
if (!(obj instanceof PemHeader)) {
return false;
}
PemHeader pemHeader = (PemHeader) obj;
return pemHeader == this || (isEqual(this.name, pemHeader.name) && isEqual(this.value, pemHeader.value));
}
private boolean isEqual(String str, String str2) {
if (str == str2) {
return true;
}
if (str == null || str2 == null) {
return false;
}
return str.equals(str2);
}
private int getHashCode(String str) {
if (str == null) {
return 1;
}
return str.hashCode();
}
public PemHeader(String str, String str2) {
this.name = str;
this.value = str2;
}
}