// 
// Decompiled by Procyon v0.6.0
// 

package org.bouncycastle.cms.jcajce;

import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
import java.security.SecureRandom;
import java.security.Provider;
import java.security.PublicKey;
import java.security.cert.CertificateEncodingException;
import org.bouncycastle.cms.KEMKeyWrapper;
import org.bouncycastle.asn1.cms.IssuerAndSerialNumber;
import org.bouncycastle.cert.jcajce.JcaX509CertificateHolder;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import java.security.cert.X509Certificate;
import org.bouncycastle.cms.KEMRecipientInfoGenerator;

public class JceKEMRecipientInfoGenerator extends KEMRecipientInfoGenerator
{
    public JceKEMRecipientInfoGenerator(final X509Certificate x509Certificate, final ASN1ObjectIdentifier asn1ObjectIdentifier) throws CertificateEncodingException {
        super(new IssuerAndSerialNumber(new JcaX509CertificateHolder(x509Certificate).toASN1Structure()), new JceCMSKEMKeyWrapper(x509Certificate.getPublicKey(), asn1ObjectIdentifier));
    }
    
    public JceKEMRecipientInfoGenerator(final byte[] array, final PublicKey publicKey, final ASN1ObjectIdentifier asn1ObjectIdentifier) {
        super(array, new JceCMSKEMKeyWrapper(publicKey, asn1ObjectIdentifier));
    }
    
    public JceKEMRecipientInfoGenerator setProvider(final String provider) {
        ((JceCMSKEMKeyWrapper)this.wrapper).setProvider(provider);
        return this;
    }
    
    public JceKEMRecipientInfoGenerator setProvider(final Provider provider) {
        ((JceCMSKEMKeyWrapper)this.wrapper).setProvider(provider);
        return this;
    }
    
    public JceKEMRecipientInfoGenerator setSecureRandom(final SecureRandom secureRandom) {
        ((JceCMSKEMKeyWrapper)this.wrapper).setSecureRandom(secureRandom);
        return this;
    }
    
    public JceKEMRecipientInfoGenerator setKDF(final AlgorithmIdentifier kdf) {
        ((JceCMSKEMKeyWrapper)this.wrapper).setKDF(kdf);
        return this;
    }
    
    public JceKEMRecipientInfoGenerator setAlgorithmMapping(final ASN1ObjectIdentifier asn1ObjectIdentifier, final String s) {
        ((JceCMSKEMKeyWrapper)this.wrapper).setAlgorithmMapping(asn1ObjectIdentifier, s);
        return this;
    }
}
