82 lines
2.1 KiB
Java
82 lines
2.1 KiB
Java
package o;
|
|
|
|
import java.security.GeneralSecurityException;
|
|
import java.util.Objects;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class SKK extends AbstractC9925dtA {
|
|
final LWm a;
|
|
private final int d;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public static final class LWm {
|
|
private final String e;
|
|
public static final LWm a = new LWm("TINK");
|
|
public static final LWm b = new LWm("CRUNCHY");
|
|
public static final LWm d = new LWm("LEGACY");
|
|
public static final LWm c = new LWm("NO_PREFIX");
|
|
|
|
private LWm(String str) {
|
|
this.e = str;
|
|
}
|
|
|
|
public final String toString() {
|
|
return this.e;
|
|
}
|
|
}
|
|
|
|
private SKK(int i, LWm lWm) {
|
|
this.d = i;
|
|
this.a = lWm;
|
|
}
|
|
|
|
public static SKK e(int i, LWm lWm) throws GeneralSecurityException {
|
|
if (i < 10 || 16 < i) {
|
|
throw new GeneralSecurityException("Invalid tag size for AesCmacParameters: ".concat(String.valueOf(i)));
|
|
}
|
|
return new SKK(i, lWm);
|
|
}
|
|
|
|
private int c() {
|
|
int i;
|
|
if (this.a != LWm.c) {
|
|
if (this.a != LWm.a) {
|
|
if (this.a != LWm.b) {
|
|
if (this.a != LWm.d) {
|
|
throw new IllegalStateException("Unknown variant");
|
|
}
|
|
i = this.d;
|
|
} else {
|
|
i = this.d;
|
|
}
|
|
} else {
|
|
i = this.d;
|
|
}
|
|
return i + 5;
|
|
}
|
|
return this.d;
|
|
}
|
|
|
|
public final boolean equals(Object obj) {
|
|
if (!(obj instanceof SKK)) {
|
|
return false;
|
|
}
|
|
SKK skk = (SKK) obj;
|
|
return skk.c() == c() && skk.a == this.a;
|
|
}
|
|
|
|
public final int hashCode() {
|
|
int i = this.d;
|
|
return Objects.hash(Integer.valueOf(i), this.a);
|
|
}
|
|
|
|
public final String toString() {
|
|
StringBuilder sb = new StringBuilder("AES-CMAC Parameters (variant: ");
|
|
sb.append(this.a);
|
|
sb.append(", ");
|
|
sb.append(this.d);
|
|
sb.append("-byte tags)");
|
|
return sb.toString();
|
|
}
|
|
}
|