package org.bouncycastle.bcpg;

/* JADX INFO: loaded from: classes.dex */
public class SymmetricKeyUtils implements SymmetricKeyAlgorithmTags {
    public static int getKeyLengthInBits(int i) {
        switch (i) {
            case 0:
                throw new IllegalArgumentException("NULL is no encryption algorithm.");
            case 1:
            case 3:
            case 4:
            case 5:
            case 7:
            case 11:
                return 128;
            case 2:
            case 8:
            case 12:
                return 192;
            case 6:
                return 64;
            case 9:
            case 10:
            case 13:
                return 256;
            default:
                throw new IllegalArgumentException("unknown symmetric algorithm: " + i);
        }
    }

    public static int getKeyLengthInOctets(int i) {
        return (getKeyLengthInBits(i) + 7) / 8;
    }
}
