75 lines
3.0 KiB
Java
75 lines
3.0 KiB
Java
|
package org.bouncycastle.jcajce.provider.digest;
|
||
|
|
||
|
import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
|
||
|
import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
|
||
|
import org.bouncycastle.crypto.CipherKeyGenerator;
|
||
|
import org.bouncycastle.crypto.digests.SHA224Digest;
|
||
|
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;
|
||
|
import org.bouncycastle.pqc.jcajce.spec.McElieceCCA2KeyGenParameterSpec;
|
||
|
import org.jmrtd.PassportService;
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public class SHA224 {
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public static class Mappings extends DigestAlgorithmProvider {
|
||
|
private static final String PREFIX = SHA224.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.SHA-224", sb.toString());
|
||
|
configurableProvider.addAlgorithm("Alg.Alias.MessageDigest.SHA224", McElieceCCA2KeyGenParameterSpec.SHA224);
|
||
|
StringBuilder sb2 = new StringBuilder("Alg.Alias.MessageDigest.");
|
||
|
sb2.append(NISTObjectIdentifiers.id_sha224);
|
||
|
configurableProvider.addAlgorithm(sb2.toString(), McElieceCCA2KeyGenParameterSpec.SHA224);
|
||
|
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, "SHA224", obj, sb4.toString());
|
||
|
addHMACAlias(configurableProvider, "SHA224", PKCSObjectIdentifiers.id_hmacWithSHA224);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* 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 SHA224Digest((SHA224Digest) this.digest);
|
||
|
return digest;
|
||
|
}
|
||
|
|
||
|
public Digest() {
|
||
|
super(new SHA224Digest());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public static class HashMac extends BaseMac {
|
||
|
public HashMac() {
|
||
|
super(new HMac(new SHA224Digest()));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public static class KeyGenerator extends BaseKeyGenerator {
|
||
|
public KeyGenerator() {
|
||
|
super("HMACSHA224", PassportService.DEFAULT_MAX_BLOCKSIZE, new CipherKeyGenerator());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private SHA224() {
|
||
|
}
|
||
|
}
|