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

61 lines
2.2 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.jcajce.provider.config.ConfigurableProvider;
import org.bouncycastle.jcajce.provider.symmetric.util.BaseKeyGenerator;
import org.bouncycastle.jcajce.provider.symmetric.util.BaseMac;
import org.bouncycastle.jcajce.provider.util.AlgorithmProvider;
/* loaded from: classes6.dex */
public final class SipHash {
/* loaded from: classes6.dex */
public static class Mappings extends AlgorithmProvider {
private static final String PREFIX = SipHash.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("$Mac24");
configurableProvider.addAlgorithm("Mac.SIPHASH-2-4", sb.toString());
configurableProvider.addAlgorithm("Alg.Alias.Mac.SIPHASH", "SIPHASH-2-4");
StringBuilder sb2 = new StringBuilder();
sb2.append(str);
sb2.append("$Mac48");
configurableProvider.addAlgorithm("Mac.SIPHASH-4-8", sb2.toString());
StringBuilder sb3 = new StringBuilder();
sb3.append(str);
sb3.append("$KeyGen");
configurableProvider.addAlgorithm("KeyGenerator.SIPHASH", sb3.toString());
configurableProvider.addAlgorithm("Alg.Alias.KeyGenerator.SIPHASH-2-4", "SIPHASH");
configurableProvider.addAlgorithm("Alg.Alias.KeyGenerator.SIPHASH-4-8", "SIPHASH");
}
}
/* loaded from: classes6.dex */
public static class KeyGen extends BaseKeyGenerator {
public KeyGen() {
super("SipHash", 128, new CipherKeyGenerator());
}
}
/* loaded from: classes6.dex */
public static class Mac24 extends BaseMac {
public Mac24() {
super(new org.bouncycastle.crypto.macs.SipHash());
}
}
/* loaded from: classes6.dex */
public static class Mac48 extends BaseMac {
public Mac48() {
super(new org.bouncycastle.crypto.macs.SipHash(4, 8));
}
}
private SipHash() {
}
}