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

package org.bouncycastle.jcajce;

import java.io.OutputStream;
import java.security.KeyStore;

public class PKCS12StoreParameter implements KeyStore.LoadStoreParameter
{
    private final OutputStream out;
    private final KeyStore.ProtectionParameter protectionParameter;
    private final boolean forDEREncoding;
    private final boolean overwriteFriendlyName;
    
    public PKCS12StoreParameter(final OutputStream outputStream, final char[] array) {
        this(outputStream, array, false);
    }
    
    public PKCS12StoreParameter(final OutputStream outputStream, final KeyStore.ProtectionParameter protectionParameter) {
        this(outputStream, protectionParameter, false, true);
    }
    
    public PKCS12StoreParameter(final OutputStream outputStream, final char[] password, final boolean b) {
        this(outputStream, new KeyStore.PasswordProtection(password), b, true);
    }
    
    public PKCS12StoreParameter(final OutputStream outputStream, final KeyStore.ProtectionParameter protectionParameter, final boolean b) {
        this(outputStream, protectionParameter, b, true);
    }
    
    public PKCS12StoreParameter(final OutputStream outputStream, final char[] password, final boolean b, final boolean b2) {
        this(outputStream, new KeyStore.PasswordProtection(password), b, b2);
    }
    
    public PKCS12StoreParameter(final OutputStream out, final KeyStore.ProtectionParameter protectionParameter, final boolean forDEREncoding, final boolean overwriteFriendlyName) {
        this.out = out;
        this.protectionParameter = protectionParameter;
        this.forDEREncoding = forDEREncoding;
        this.overwriteFriendlyName = overwriteFriendlyName;
    }
    
    public OutputStream getOutputStream() {
        return this.out;
    }
    
    @Override
    public KeyStore.ProtectionParameter getProtectionParameter() {
        return this.protectionParameter;
    }
    
    public boolean isForDEREncoding() {
        return this.forDEREncoding;
    }
    
    public boolean isOverwriteFriendlyName() {
        return this.overwriteFriendlyName;
    }
}
