package org.bouncycastle.bcpg;

/* JADX INFO: loaded from: classes.dex */
public class HashUtils {
    public static int getV6SignatureSaltSizeInBytes(int i) {
        switch (i) {
            case 8:
            case 11:
            case 12:
            case HashAlgorithmTags.SHA3_256_OLD /* 313 */:
                return 16;
            case 9:
                return 24;
            case 10:
            case 14:
            case HashAlgorithmTags.SHA3_512_OLD /* 315 */:
                return 32;
            default:
                throw new IllegalArgumentException("Salt size not specified for Hash Algorithm with ID " + i);
        }
    }

    public boolean saltSizeMatchesSpec(int i, int i2) {
        try {
            return i2 == getV6SignatureSaltSizeInBytes(i);
        } catch (IllegalArgumentException e) {
            return false;
        }
    }
}
