Example usage for org.bouncycastle.bcpg PublicKeyPacket encode

List of usage examples for org.bouncycastle.bcpg PublicKeyPacket encode

Introduction

In this page you can find the example usage for org.bouncycastle.bcpg PublicKeyPacket encode.

Prototype

public void encode(BCPGOutputStream out) throws IOException 

Source Link

Usage

From source file:de.dentrassi.pm.signing.pgp.internal.PgpSigningService.java

License:Open Source License

@Override
public void printPublicKey(final OutputStream out) throws IOException {
    final ArmoredOutputStream armoredOutput = new ArmoredOutputStream(out);
    final PublicKeyPacket pubKey = this.privateKey.getPublicKeyPacket();
    pubKey.encode(new BCPGOutputStream(armoredOutput));
    armoredOutput.close();//from  w w w. j a  v a2s .co m
}