Example usage for org.bouncycastle.bcpg DSAPublicBCPGKey getP

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

Introduction

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

Prototype

public BigInteger getP() 

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();
}