package org.bouncycastle.jcajce.provider.digest; import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers; import org.bouncycastle.crypto.CipherKeyGenerator; import org.bouncycastle.crypto.digests.MD4Digest; import org.bouncycastle.crypto.macs.HMac; import org.bouncycastle.jcajce.provider.config.ConfigurableProvider; import org.bouncycastle.jcajce.provider.symmetric.util.BaseKeyGenerator; import org.bouncycastle.jcajce.provider.symmetric.util.BaseMac; /* loaded from: classes6.dex */ public class MD4 { /* loaded from: classes6.dex */ public static class Mappings extends DigestAlgorithmProvider { private static final String PREFIX = MD4.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("$Digest"); configurableProvider.addAlgorithm("MessageDigest.MD4", sb.toString()); StringBuilder sb2 = new StringBuilder("Alg.Alias.MessageDigest."); sb2.append(PKCSObjectIdentifiers.md4); configurableProvider.addAlgorithm(sb2.toString(), "MD4"); StringBuilder sb3 = new StringBuilder(); sb3.append(str); sb3.append("$HashMac"); String obj = sb3.toString(); StringBuilder sb4 = new StringBuilder(); sb4.append(str); sb4.append("$KeyGenerator"); addHMACAlgorithm(configurableProvider, "MD4", obj, sb4.toString()); } } /* loaded from: classes6.dex */ public static class Digest extends BCMessageDigest implements Cloneable { @Override // java.security.MessageDigest, java.security.MessageDigestSpi public Object clone() throws CloneNotSupportedException { Digest digest = (Digest) super.clone(); digest.digest = new MD4Digest((MD4Digest) this.digest); return digest; } public Digest() { super(new MD4Digest()); } } /* loaded from: classes6.dex */ public static class HashMac extends BaseMac { public HashMac() { super(new HMac(new MD4Digest())); } } /* loaded from: classes6.dex */ public static class KeyGenerator extends BaseKeyGenerator { public KeyGenerator() { super("HMACMD4", 128, new CipherKeyGenerator()); } } private MD4() { } }