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

package org.bouncycastle.crypto.signers;

import org.bouncycastle.crypto.CryptoServicePurpose;
import org.bouncycastle.crypto.CipherParameters;
import org.bouncycastle.crypto.params.ECKeyParameters;
import org.bouncycastle.crypto.params.GOST3410KeyParameters;
import org.bouncycastle.crypto.constraints.DefaultServiceProperties;
import org.bouncycastle.crypto.constraints.ConstraintUtils;
import org.bouncycastle.crypto.CryptoServiceProperties;
import org.bouncycastle.crypto.params.DSAKeyParameters;

class Utils
{
    static CryptoServiceProperties getDefaultProperties(final String s, final DSAKeyParameters dsaKeyParameters, final boolean b) {
        return new DefaultServiceProperties(s, ConstraintUtils.bitsOfSecurityFor(dsaKeyParameters.getParameters().getP()), dsaKeyParameters, getPurpose(b));
    }
    
    static CryptoServiceProperties getDefaultProperties(final String s, final GOST3410KeyParameters gost3410KeyParameters, final boolean b) {
        return new DefaultServiceProperties(s, ConstraintUtils.bitsOfSecurityFor(gost3410KeyParameters.getParameters().getP()), gost3410KeyParameters, getPurpose(b));
    }
    
    static CryptoServiceProperties getDefaultProperties(final String s, final ECKeyParameters ecKeyParameters, final boolean b) {
        return new DefaultServiceProperties(s, ConstraintUtils.bitsOfSecurityFor(ecKeyParameters.getParameters().getCurve()), ecKeyParameters, getPurpose(b));
    }
    
    static CryptoServiceProperties getDefaultProperties(final String s, final int n, final CipherParameters cipherParameters, final boolean b) {
        return new DefaultServiceProperties(s, n, cipherParameters, getPurpose(b));
    }
    
    static CryptoServicePurpose getPurpose(final boolean b) {
        return b ? CryptoServicePurpose.SIGNING : CryptoServicePurpose.VERIFYING;
    }
}
