Example usage for org.bouncycastle.bcpg DSAPublicBCPGKey getG

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

Introduction

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

Prototype

public BigInteger getG() 

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