- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
48 lines
1.4 KiB
Java
48 lines
1.4 KiB
Java
package com.google.android.gms.internal.ads;
|
|
|
|
import java.nio.charset.Charset;
|
|
import java.security.GeneralSecurityException;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class zzgnu {
|
|
static {
|
|
Charset.forName("UTF-8");
|
|
}
|
|
|
|
public static final zzgvo zza(String str) throws GeneralSecurityException {
|
|
byte[] bArr = new byte[str.length()];
|
|
for (int i = 0; i < str.length(); i++) {
|
|
char charAt = str.charAt(i);
|
|
if (charAt < '!' || charAt > '~') {
|
|
throw new GeneralSecurityException("Not a printable ASCII character: " + charAt);
|
|
}
|
|
bArr[i] = (byte) charAt;
|
|
}
|
|
return zzgvo.zzb(bArr);
|
|
}
|
|
|
|
public static final zzgvo zzb(String str) {
|
|
byte[] bArr = new byte[str.length()];
|
|
for (int i = 0; i < str.length(); i++) {
|
|
char charAt = str.charAt(i);
|
|
if (charAt < '!' || charAt > '~') {
|
|
throw new zzgnt("Not a printable ASCII character: " + charAt);
|
|
}
|
|
bArr[i] = (byte) charAt;
|
|
}
|
|
return zzgvo.zzb(bArr);
|
|
}
|
|
|
|
public static boolean zzc(byte[] bArr, byte[] bArr2) {
|
|
if (bArr2.length < bArr.length) {
|
|
return false;
|
|
}
|
|
for (int i = 0; i < bArr.length; i++) {
|
|
if (bArr2[i] != bArr[i]) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
}
|