what-the-bank/sources/org/bouncycastle/jcajce/provider/symmetric/Skipjack.java

88 lines
3.3 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.jcajce.provider.symmetric;
import org.bouncycastle.crypto.CipherKeyGenerator;
import org.bouncycastle.crypto.engines.SkipjackEngine;
import org.bouncycastle.crypto.macs.CBCBlockCipherMac;
import org.bouncycastle.crypto.macs.CFBBlockCipherMac;
import org.bouncycastle.jcajce.provider.config.ConfigurableProvider;
import org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher;
import org.bouncycastle.jcajce.provider.symmetric.util.BaseKeyGenerator;
import org.bouncycastle.jcajce.provider.symmetric.util.BaseMac;
import org.bouncycastle.jcajce.provider.symmetric.util.IvAlgorithmParameters;
import org.bouncycastle.jcajce.provider.util.AlgorithmProvider;
/* loaded from: classes6.dex */
public final class Skipjack {
/* loaded from: classes6.dex */
public static class Mappings extends AlgorithmProvider {
private static final String PREFIX = Skipjack.class.getName();
@Override // org.bouncycastle.jcajce.provider.util.AlgorithmProvider
public void configure(ConfigurableProvider configurableProvider) {
StringBuilder sb = new StringBuilder();
String str = PREFIX;
sb.append(str);
sb.append("$ECB");
configurableProvider.addAlgorithm("Cipher.SKIPJACK", sb.toString());
StringBuilder sb2 = new StringBuilder();
sb2.append(str);
sb2.append("$KeyGen");
configurableProvider.addAlgorithm("KeyGenerator.SKIPJACK", sb2.toString());
StringBuilder sb3 = new StringBuilder();
sb3.append(str);
sb3.append("$AlgParams");
configurableProvider.addAlgorithm("AlgorithmParameters.SKIPJACK", sb3.toString());
StringBuilder sb4 = new StringBuilder();
sb4.append(str);
sb4.append("$Mac");
configurableProvider.addAlgorithm("Mac.SKIPJACKMAC", sb4.toString());
configurableProvider.addAlgorithm("Alg.Alias.Mac.SKIPJACK", "SKIPJACKMAC");
StringBuilder sb5 = new StringBuilder();
sb5.append(str);
sb5.append("$MacCFB8");
configurableProvider.addAlgorithm("Mac.SKIPJACKMAC/CFB8", sb5.toString());
configurableProvider.addAlgorithm("Alg.Alias.Mac.SKIPJACK/CFB8", "SKIPJACKMAC/CFB8");
}
}
/* loaded from: classes6.dex */
public static class AlgParams extends IvAlgorithmParameters {
@Override // org.bouncycastle.jcajce.provider.symmetric.util.IvAlgorithmParameters, java.security.AlgorithmParametersSpi
public String engineToString() {
return "Skipjack IV";
}
}
/* loaded from: classes6.dex */
public static class ECB extends BaseBlockCipher {
public ECB() {
super(new SkipjackEngine());
}
}
/* loaded from: classes6.dex */
public static class KeyGen extends BaseKeyGenerator {
public KeyGen() {
super("Skipjack", 80, new CipherKeyGenerator());
}
}
/* loaded from: classes6.dex */
public static class Mac extends BaseMac {
public Mac() {
super(new CBCBlockCipherMac(new SkipjackEngine()));
}
}
/* loaded from: classes6.dex */
public static class MacCFB8 extends BaseMac {
public MacCFB8() {
super(new CFBBlockCipherMac(new SkipjackEngine()));
}
}
private Skipjack() {
}
}