Java 8 DSAPrivateKeySpec - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 DSAPrivateKeySpec class.

This code example shows how to use the following methods:getG, getP, getQ, getX
 
        return super.engineGetKeySpec(key, spec);
    } 
 
    protected Key engineTranslateKey(
        Key key)
        throws InvalidKeyException 
    { 
        if (key instanceof DSAPublicKey)
        { 
            return new BCDSAPublicKey((DSAPublicKey)key);
        } 
        else if (key instanceof DSAPrivateKey)
        { 
            return new BCDSAPrivateKey((DSAPrivateKey)key);
        } 
 
        throw new InvalidKeyException("key type unknown");
    } 
 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getG, getP, getQ, getX
    } 
 
    BCDSAPrivateKey( 
        DSAPrivateKeySpec spec)
    { 
        this.x = spec.getX();
        this.dsaSpec = new DSAParameterSpec(spec.getP(), spec.getQ(), spec.getG());
    } 
 
    public BCDSAPrivateKey( 
        PrivateKeyInfo info)
        throws IOException 
    { 
        DSAParameter    params = DSAParameter.getInstance(info.getPrivateKeyAlgorithm().getParameters());
        ASN1Integer      derX = (ASN1Integer)info.parsePrivateKey();
 
        this.x = derX.getValue();
        this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG());
    } 
 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getG, getP, getQ, getX
    } 
 
    JDKDSAPrivateKey( 
        DSAPrivateKeySpec    spec)
    { 
        this.x = spec.getX();
        this.dsaSpec = new DSAParameterSpec(spec.getP(), spec.getQ(), spec.getG());
    } 
 
    JDKDSAPrivateKey( 
        PrivateKeyInfo  info)
        throws IOException 
    { 
        DSAParameter    params = DSAParameter.getInstance(info.getPrivateKeyAlgorithm().getParameters());
        DERInteger      derX = ASN1Integer.getInstance(info.parsePrivateKey());
 
        this.x = derX.getValue();
        this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG());
    } 
 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getG, getP, getQ, getX
 
        return super.engineGetKeySpec(key, spec);
    } 
 
    protected Key engineTranslateKey(
        Key key)
        throws InvalidKeyException
    { 
        if (key instanceof DSAPublicKey)
        { 
            return new BCDSAPublicKey((DSAPublicKey)key);
        } 
        else if (key instanceof DSAPrivateKey)
        { 
            return new BCDSAPrivateKey((DSAPrivateKey)key);
        } 
 
        throw new InvalidKeyException("key type unknown");
    } 
 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getG, getP, getQ, getX
    } 
 
    BCDSAPrivateKey( 
        DSAPrivateKeySpec spec)
    { 
        this.x = spec.getX();
        this.dsaSpec = new DSAParameterSpec(spec.getP(), spec.getQ(), spec.getG());
    } 
 
    public BCDSAPrivateKey( 
        PrivateKeyInfo info)
        throws IOException
    { 
        DSAParameter    params = DSAParameter.getInstance(info.getPrivateKeyAlgorithm().getParameters());
        ASN1Integer      derX = (ASN1Integer)info.parsePrivateKey();
 
        this.x = derX.getValue();
        this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG());
    } 
 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getG, getP, getQ, getX
 
        return super.engineGetKeySpec(key, spec);
    } 
 
    protected Key engineTranslateKey(
        Key key)
        throws InvalidKeyException 
    { 
        if (key instanceof DSAPublicKey)
        { 
            return new BCDSAPublicKey((DSAPublicKey)key);
        } 
        else if (key instanceof DSAPrivateKey)
        { 
            return new BCDSAPrivateKey((DSAPrivateKey)key);
        } 
 
        throw new InvalidKeyException("key type unknown");
    } 
 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getG, getP, getQ, getX
    } 
 
    JDKDSAPrivateKey( 
        DSAPrivateKeySpec    spec)
    { 
        this.x = spec.getX();
        this.dsaSpec = new DSAParameterSpec(spec.getP(), spec.getQ(), spec.getG());
    } 
 
    JDKDSAPrivateKey( 
        PrivateKeyInfo  info)
        throws IOException
    { 
        DSAParameter    params = DSAParameter.getInstance(info.getPrivateKeyAlgorithm().getParameters());
        ASN1Integer      derX = ASN1Integer.getInstance(info.parsePrivateKey());
 
        this.x = derX.getValue();
        this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG());
    } 
 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getG, getP, getQ, getX
    } 
 
    BCDSAPrivateKey( 
        DSAPrivateKeySpec spec)
    { 
        this.x = spec.getX();
        this.dsaSpec = new DSAParameterSpec(spec.getP(), spec.getQ(), spec.getG());
    } 
 
    public BCDSAPrivateKey( 
        PrivateKeyInfo info)
        throws IOException 
    { 
        DSAParameter    params = DSAParameter.getInstance(info.getPrivateKeyAlgorithm().getParameters());
        ASN1Integer      derX = (ASN1Integer)info.parsePrivateKey();
 
        this.x = derX.getValue();
        this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG());
    } 
 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getG, getP, getQ, getX
    } 
 
    JDKDSAPrivateKey( 
        DSAPrivateKeySpec    spec)
    { 
        this.x = spec.getX();
        this.dsaSpec = new DSAParameterSpec(spec.getP(), spec.getQ(), spec.getG());
    } 
 
    JDKDSAPrivateKey( 
        PrivateKeyInfo  info)
        throws IOException 
    { 
        DSAParameter    params = DSAParameter.getInstance(info.getPrivateKeyAlgorithm().getParameters());
        DERInteger      derX = ASN1Integer.getInstance(info.parsePrivateKey());
 
        this.x = derX.getValue();
        this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG());
    } 
 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getG, getP, getQ, getX
    } 
 
    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();
 
        this.x = derX.getValue();
        this.dsaSpec = new DSAParameterSpec(params.getP(), params.getQ(), params.getG());
    } 
 
    JDKDSAPrivateKey( 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 DSAPrivateKeySpec Methods: