Example usage for org.bouncycastle.bcpg DSAPublicBCPGKey getQ

List of usage examples for org.bouncycastle.bcpg DSAPublicBCPGKey getQ

Introduction

In this page you can find the example usage for org.bouncycastle.bcpg DSAPublicBCPGKey getQ.

Prototype

public BigInteger getQ() 

Source Link

Usage

From source file:org.sufficientlysecure.keychain.pgp.SshPublicKey.java

License:Open Source License

private String encodeDSAKey(PGPPublicKey publicKey) {
    DSAPublicBCPGKey publicBCPGKey = (DSAPublicBCPGKey) publicKey.getPublicKeyPacket().getKey();

    SshDSAPublicKey sshDSAPublicKey = new SshDSAPublicKey(publicBCPGKey.getP(), publicBCPGKey.getQ(),
            publicBCPGKey.getG(), publicBCPGKey.getY());

    return sshDSAPublicKey.getPublicKeyBlob();
}