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

88 lines
3.4 KiB
Java

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.Provider;
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 ProviderJcaJceHelper implements JcaJceHelper {
protected final Provider provider;
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public Signature createSignature(String str) throws NoSuchAlgorithmException {
return Signature.getInstance(str, this.provider);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public SecretKeyFactory createSecretKeyFactory(String str) throws NoSuchAlgorithmException {
return SecretKeyFactory.getInstance(str, this.provider);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public Mac createMac(String str) throws NoSuchAlgorithmException {
return Mac.getInstance(str, this.provider);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public KeyPairGenerator createKeyPairGenerator(String str) throws NoSuchAlgorithmException {
return KeyPairGenerator.getInstance(str, this.provider);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public KeyGenerator createKeyGenerator(String str) throws NoSuchAlgorithmException {
return KeyGenerator.getInstance(str, this.provider);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public KeyFactory createKeyFactory(String str) throws NoSuchAlgorithmException {
return KeyFactory.getInstance(str, this.provider);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public KeyAgreement createKeyAgreement(String str) throws NoSuchAlgorithmException {
return KeyAgreement.getInstance(str, this.provider);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public MessageDigest createDigest(String str) throws NoSuchAlgorithmException {
return MessageDigest.getInstance(str, this.provider);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public Cipher createCipher(String str) throws NoSuchAlgorithmException, NoSuchPaddingException {
return Cipher.getInstance(str, this.provider);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public CertificateFactory createCertificateFactory(String str) throws CertificateException {
return CertificateFactory.getInstance(str, this.provider);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public AlgorithmParameters createAlgorithmParameters(String str) throws NoSuchAlgorithmException {
return AlgorithmParameters.getInstance(str, this.provider);
}
@Override // org.bouncycastle.jcajce.util.JcaJceHelper
public AlgorithmParameterGenerator createAlgorithmParameterGenerator(String str) throws NoSuchAlgorithmException {
return AlgorithmParameterGenerator.getInstance(str, this.provider);
}
public ProviderJcaJceHelper(Provider provider) {
this.provider = provider;
}
}