导航菜单

页面标题

页面副标题

Kaspi.kz v5.85.1 - ProtoBufAnnotationArgumentValue1.java 源代码

正在查看: Kaspi.kz v5.85.1 应用的 ProtoBufAnnotationArgumentValue1.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package o;

import java.io.File;
import java.io.IOException;
import java.math.BigInteger;
import java.security.GeneralSecurityException;
import java.security.InvalidAlgorithmParameterException;
import java.util.Locale;
import java.util.regex.Pattern;
import o.access2902;

public final class ProtoBufAnnotationArgumentValue1 {
    private static final String setError = "type.googleapis.com/";
    private static final int setFieldValue = 2048;
    private static final String setOptions = "([0-9a-zA-Z\\-\\.\\_~])+";
    private static final Pattern setBackground = Pattern.compile(String.format("^projects/%s/locations/%s/keyRings/%s/cryptoKeys/%s$", setOptions, setOptions, setOptions, setOptions), 2);
    private static final Pattern setLabel = Pattern.compile(String.format("^projects/%s/locations/%s/keyRings/%s/cryptoKeys/%s/cryptoKeyVersions/%s$", setOptions, setOptions, setOptions, setOptions, setOptions), 2);

    private ProtoBufAnnotationArgumentValue1() {
    }

    public static void setError(String str) throws GeneralSecurityException {
        if (!str.startsWith(setError)) {
            throw new GeneralSecurityException(String.format("Error: type URL %s is invalid; it must start with %s.\n", str, setError));
        }
        if (str.length() == 20) {
            throw new GeneralSecurityException(String.format("Error: type URL %s is invalid; it has no message name.\n", str));
        }
    }

    public static void setFieldValue(int i) throws InvalidAlgorithmParameterException {
        if (i != 16 && i != 32) {
            throw new InvalidAlgorithmParameterException(String.format("invalid key size %d; only 128-bit and 256-bit AES keys are supported", Integer.valueOf(i * 8)));
        }
    }

    public static void setError(int i, int i2) throws GeneralSecurityException {
        if (i < 0 || i > i2) {
            throw new GeneralSecurityException(String.format("key has version %d; only keys with version in range [0..%d] are supported", Integer.valueOf(i), Integer.valueOf(i2)));
        }
    }

    static class AnonymousClass5 {
        static final int[] setLabel;

        static {
            int[] iArr = new int[access2902.setBackground.values().length];
            setLabel = iArr;
            try {
                iArr[access2902.setBackground.setLabel.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                setLabel[access2902.setBackground.setBackground.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                setLabel[access2902.setBackground.setFieldValue.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
        }
    }

    public static void setFieldValue(access2902.setBackground setbackground) throws GeneralSecurityException {
        int i = AnonymousClass5.setLabel[setbackground.ordinal()];
        if (i == 1 || i == 2 || i == 3) {
            return;
        }
        throw new GeneralSecurityException("Unsupported hash: " + setbackground.name());
    }

    public static void setBackground(int i) throws GeneralSecurityException {
        if (i < 2048) {
            throw new GeneralSecurityException(String.format("Modulus size is %d; only modulus size >= 2048-bit is supported", Integer.valueOf(i)));
        }
    }

    public static void setBackground(BigInteger bigInteger) throws GeneralSecurityException {
        if (!bigInteger.testBit(0)) {
            throw new GeneralSecurityException("Public exponent must be odd.");
        }
        if (bigInteger.compareTo(BigInteger.valueOf(65536L)) <= 0) {
            throw new GeneralSecurityException("Public exponent must be greater than 65536.");
        }
    }

    public static void setFieldValue(File file) throws IOException {
        if (file.exists()) {
            throw new IOException(String.format("%s exists, please choose another file\n", file));
        }
    }

    public static void setLabel(File file) throws IOException {
        if (!file.exists()) {
            throw new IOException(String.format("Error: %s doesn't exist, please choose another file\n", file));
        }
    }

    public static String setOptions(String str, String str2) {
        if (!str2.toLowerCase(Locale.US).startsWith(str)) {
            throw new IllegalArgumentException(String.format("key URI must start with %s", str));
        }
        return str2.substring(str.length());
    }

    public static void setLabel(String str) throws GeneralSecurityException {
        if (setBackground.matcher(str).matches()) {
            return;
        }
        if (setLabel.matcher(str).matches()) {
            throw new GeneralSecurityException("Invalid Google Cloud KMS Key URI. The URI must point to a CryptoKey, not a CryptoKeyVersion");
        }
        throw new GeneralSecurityException("Invalid Google Cloud KMS Key URI. The URI must point to a CryptoKey in the format projects/*/locations/*/keyRings/*/cryptoKeys/*. See https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys#CryptoKey");
    }
}