package defpackage;

import com.google.crypto.tink.internal.TinkBugException;
import java.nio.charset.Charset;
import java.security.GeneralSecurityException;

/* renamed from: ˈᵘᵕ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public abstract class AbstractC1067 {

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public static final /* synthetic */ int f4631 = 0;

    static {
        Charset.forName("UTF-8");
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public static final C4542 m3455(String str) {
        byte[] bArr = new byte[str.length()];
        for (int i = 0; i < str.length(); i++) {
            char cCharAt = str.charAt(i);
            if (cCharAt < '!' || cCharAt > '~') {
                throw new TinkBugException("Not a printable ASCII character: " + cCharAt);
            }
            bArr[i] = (byte) cCharAt;
        }
        return C4542.m9654(bArr);
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public static final C4542 m3456(String str) throws GeneralSecurityException {
        byte[] bArr = new byte[str.length()];
        for (int i = 0; i < str.length(); i++) {
            char cCharAt = str.charAt(i);
            if (cCharAt < '!' || cCharAt > '~') {
                throw new GeneralSecurityException("Not a printable ASCII character: " + cCharAt);
            }
            bArr[i] = (byte) cCharAt;
        }
        return C4542.m9654(bArr);
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public static boolean m3457(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;
    }
}
