Code example for DSAParameterSpec

0
    { 
        try 
        { 
            DSAParameter dsaP = DSAParameter.getInstance(ASN1Primitive.fromByteArray(params));
 
            currentSpec = new DSAParameterSpec(dsaP.getP(), dsaP.getQ(), dsaP.getG());
        } 
        catch (ClassCastException e)
        { 
            throw new IOException("Not a valid DSA Parameter encoding.");
        } 
        catch (ArrayIndexOutOfBoundsException e)
        { 
            throw new IOException("Not a valid DSA Parameter encoding.");
        } 
    } 
 
    protected void engineInit( 
        byte[] params,
        String format)
        throws IOException