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

164 lines
6.3 KiB
Java

package org.bouncycastle.jcajce.provider.symmetric;
import org.bouncycastle.crypto.CipherKeyGenerator;
import org.bouncycastle.crypto.engines.ThreefishEngine;
import org.bouncycastle.crypto.macs.CMac;
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 Threefish {
/* loaded from: classes6.dex */
public static class Mappings extends AlgorithmProvider {
private static final String PREFIX = Threefish.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("$CMAC_256");
configurableProvider.addAlgorithm("Mac.Threefish-256CMAC", sb.toString());
StringBuilder sb2 = new StringBuilder();
sb2.append(str);
sb2.append("$CMAC_512");
configurableProvider.addAlgorithm("Mac.Threefish-512CMAC", sb2.toString());
StringBuilder sb3 = new StringBuilder();
sb3.append(str);
sb3.append("$CMAC_1024");
configurableProvider.addAlgorithm("Mac.Threefish-1024CMAC", sb3.toString());
StringBuilder sb4 = new StringBuilder();
sb4.append(str);
sb4.append("$ECB_256");
configurableProvider.addAlgorithm("Cipher.Threefish-256", sb4.toString());
StringBuilder sb5 = new StringBuilder();
sb5.append(str);
sb5.append("$ECB_512");
configurableProvider.addAlgorithm("Cipher.Threefish-512", sb5.toString());
StringBuilder sb6 = new StringBuilder();
sb6.append(str);
sb6.append("$ECB_1024");
configurableProvider.addAlgorithm("Cipher.Threefish-1024", sb6.toString());
StringBuilder sb7 = new StringBuilder();
sb7.append(str);
sb7.append("$KeyGen_256");
configurableProvider.addAlgorithm("KeyGenerator.Threefish-256", sb7.toString());
StringBuilder sb8 = new StringBuilder();
sb8.append(str);
sb8.append("$KeyGen_512");
configurableProvider.addAlgorithm("KeyGenerator.Threefish-512", sb8.toString());
StringBuilder sb9 = new StringBuilder();
sb9.append(str);
sb9.append("$KeyGen_1024");
configurableProvider.addAlgorithm("KeyGenerator.Threefish-1024", sb9.toString());
StringBuilder sb10 = new StringBuilder();
sb10.append(str);
sb10.append("$AlgParams_256");
configurableProvider.addAlgorithm("AlgorithmParameters.Threefish-256", sb10.toString());
StringBuilder sb11 = new StringBuilder();
sb11.append(str);
sb11.append("$AlgParams_512");
configurableProvider.addAlgorithm("AlgorithmParameters.Threefish-512", sb11.toString());
StringBuilder sb12 = new StringBuilder();
sb12.append(str);
sb12.append("$AlgParams_1024");
configurableProvider.addAlgorithm("AlgorithmParameters.Threefish-1024", sb12.toString());
}
}
/* loaded from: classes6.dex */
public static class AlgParams_1024 extends IvAlgorithmParameters {
@Override // org.bouncycastle.jcajce.provider.symmetric.util.IvAlgorithmParameters, java.security.AlgorithmParametersSpi
public String engineToString() {
return "Threefish-1024 IV";
}
}
/* loaded from: classes6.dex */
public static class AlgParams_256 extends IvAlgorithmParameters {
@Override // org.bouncycastle.jcajce.provider.symmetric.util.IvAlgorithmParameters, java.security.AlgorithmParametersSpi
public String engineToString() {
return "Threefish-256 IV";
}
}
/* loaded from: classes6.dex */
public static class AlgParams_512 extends IvAlgorithmParameters {
@Override // org.bouncycastle.jcajce.provider.symmetric.util.IvAlgorithmParameters, java.security.AlgorithmParametersSpi
public String engineToString() {
return "Threefish-512 IV";
}
}
/* loaded from: classes6.dex */
public static class CMAC_1024 extends BaseMac {
public CMAC_1024() {
super(new CMac(new ThreefishEngine(1024)));
}
}
/* loaded from: classes6.dex */
public static class CMAC_256 extends BaseMac {
public CMAC_256() {
super(new CMac(new ThreefishEngine(256)));
}
}
/* loaded from: classes6.dex */
public static class CMAC_512 extends BaseMac {
public CMAC_512() {
super(new CMac(new ThreefishEngine(512)));
}
}
/* loaded from: classes6.dex */
public static class ECB_1024 extends BaseBlockCipher {
public ECB_1024() {
super(new ThreefishEngine(1024));
}
}
/* loaded from: classes6.dex */
public static class ECB_256 extends BaseBlockCipher {
public ECB_256() {
super(new ThreefishEngine(256));
}
}
/* loaded from: classes6.dex */
public static class ECB_512 extends BaseBlockCipher {
public ECB_512() {
super(new ThreefishEngine(512));
}
}
/* loaded from: classes6.dex */
public static class KeyGen_1024 extends BaseKeyGenerator {
public KeyGen_1024() {
super("Threefish-1024", 1024, new CipherKeyGenerator());
}
}
/* loaded from: classes6.dex */
public static class KeyGen_256 extends BaseKeyGenerator {
public KeyGen_256() {
super("Threefish-256", 256, new CipherKeyGenerator());
}
}
/* loaded from: classes6.dex */
public static class KeyGen_512 extends BaseKeyGenerator {
public KeyGen_512() {
super("Threefish-512", 512, new CipherKeyGenerator());
}
}
private Threefish() {
}
}