17 lines
1.1 KiB
Java
17 lines
1.1 KiB
Java
|
package org.bouncycastle.jcajce.provider.asymmetric.util;
|
||
|
|
||
|
import org.bouncycastle.crypto.BlockCipher;
|
||
|
import org.bouncycastle.crypto.BufferedBlockCipher;
|
||
|
import org.bouncycastle.jce.spec.IESParameterSpec;
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public class IESUtil {
|
||
|
public static IESParameterSpec guessParameterSpec(BufferedBlockCipher bufferedBlockCipher) {
|
||
|
if (bufferedBlockCipher == null) {
|
||
|
return new IESParameterSpec(null, null, 128);
|
||
|
}
|
||
|
BlockCipher underlyingCipher = bufferedBlockCipher.getUnderlyingCipher();
|
||
|
return (underlyingCipher.getAlgorithmName().equals("DES") || underlyingCipher.getAlgorithmName().equals("RC2") || underlyingCipher.getAlgorithmName().equals("RC5-32") || underlyingCipher.getAlgorithmName().equals("RC5-64")) ? new IESParameterSpec(null, null, 64, 64) : underlyingCipher.getAlgorithmName().equals("SKIPJACK") ? new IESParameterSpec(null, null, 80, 80) : underlyingCipher.getAlgorithmName().equals("GOST28147") ? new IESParameterSpec(null, null, 256, 256) : new IESParameterSpec(null, null, 128, 128);
|
||
|
}
|
||
|
}
|