what-the-bank/sources/org/bouncycastle/jcajce/util/NamedJcaJceHelper.java

88 lines
3.8 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.jcajce.util;
import java.security.AlgorithmParameterGenerator;
import java.security.AlgorithmParameters;
import java.security.KeyFactory;
import java.security.KeyPairGenerator;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.Signature;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import javax.crypto.Cipher;
import javax.crypto.KeyAgreement;
import javax.crypto.KeyGenerator;
import javax.crypto.Mac;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKeyFactory;
/* loaded from: classes6.dex */
public class NamedJcaJceHelper implements JcaJceHelper {
protected final String providerName;
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public Signature createSignature(String str) throws NoSuchAlgorithmException, NoSuchProviderException {
return Signature.getInstance(str, this.providerName);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public SecretKeyFactory createSecretKeyFactory(String str) throws NoSuchAlgorithmException, NoSuchProviderException {
return SecretKeyFactory.getInstance(str, this.providerName);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public Mac createMac(String str) throws NoSuchAlgorithmException, NoSuchProviderException {
return Mac.getInstance(str, this.providerName);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public KeyPairGenerator createKeyPairGenerator(String str) throws NoSuchAlgorithmException, NoSuchProviderException {
return KeyPairGenerator.getInstance(str, this.providerName);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public KeyGenerator createKeyGenerator(String str) throws NoSuchAlgorithmException, NoSuchProviderException {
return KeyGenerator.getInstance(str, this.providerName);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public KeyFactory createKeyFactory(String str) throws NoSuchAlgorithmException, NoSuchProviderException {
return KeyFactory.getInstance(str, this.providerName);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public KeyAgreement createKeyAgreement(String str) throws NoSuchAlgorithmException, NoSuchProviderException {
return KeyAgreement.getInstance(str, this.providerName);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public MessageDigest createDigest(String str) throws NoSuchAlgorithmException, NoSuchProviderException {
return MessageDigest.getInstance(str, this.providerName);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public Cipher createCipher(String str) throws NoSuchAlgorithmException, NoSuchPaddingException, NoSuchProviderException {
return Cipher.getInstance(str, this.providerName);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public CertificateFactory createCertificateFactory(String str) throws CertificateException, NoSuchProviderException {
return CertificateFactory.getInstance(str, this.providerName);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public AlgorithmParameters createAlgorithmParameters(String str) throws NoSuchAlgorithmException, NoSuchProviderException {
return AlgorithmParameters.getInstance(str, this.providerName);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public AlgorithmParameterGenerator createAlgorithmParameterGenerator(String str) throws NoSuchAlgorithmException, NoSuchProviderException {
return AlgorithmParameterGenerator.getInstance(str, this.providerName);
}
public NamedJcaJceHelper(String str) {
this.providerName = str;
}
}