Code example for DSAPrivateKey

Methods: getParams, getX

0
    } 
 
    JDKDSAPrivateKey( 
        DSAPrivateKey    key)
    { 
        this.x = key.getX();
        this.dsaSpec = key.getParams();
    } 
 
    JDKDSAPrivateKey( 
        DSAPrivateKeySpec    spec)
    { 
        this.x = spec.getX();
        this.dsaSpec = new DSAParameterSpec(spec.getP(), spec.getQ(), spec.getG());
    } 
 
    JDKDSAPrivateKey( 
        PrivateKeyInfo  info)
    { 
        DSAParameter    params = new DSAParameter((ASN1Sequence)info.getAlgorithmId().getParameters());
        DERInteger      derX = (DERInteger)info.getPrivateKey();