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

package org.bouncycastle.crypto.constraints;

import org.bouncycastle.crypto.CryptoServicePurpose;
import org.bouncycastle.crypto.CryptoServiceProperties;

public class DefaultServiceProperties implements CryptoServiceProperties
{
    private final String algorithm;
    private final int bitsOfSecurity;
    private final Object params;
    private final CryptoServicePurpose purpose;
    
    public DefaultServiceProperties(final String s, final int n) {
        this(s, n, null, CryptoServicePurpose.ANY);
    }
    
    public DefaultServiceProperties(final String s, final int n, final Object o) {
        this(s, n, o, CryptoServicePurpose.ANY);
    }
    
    public DefaultServiceProperties(final String algorithm, final int bitsOfSecurity, final Object params, final CryptoServicePurpose purpose) {
        this.algorithm = algorithm;
        this.bitsOfSecurity = bitsOfSecurity;
        this.params = params;
        if (params instanceof CryptoServicePurpose) {
            throw new IllegalArgumentException("params should not be CryptoServicePurpose");
        }
        this.purpose = purpose;
    }
    
    @Override
    public int bitsOfSecurity() {
        return this.bitsOfSecurity;
    }
    
    @Override
    public String getServiceName() {
        return this.algorithm;
    }
    
    @Override
    public CryptoServicePurpose getPurpose() {
        return this.purpose;
    }
    
    @Override
    public Object getParams() {
        return this.params;
    }
}
