org.apache.commons.openpgp
Class BouncyCastleOpenPgpSigner

java.lang.Object
  extended by org.apache.commons.openpgp.BouncyCastleOpenPgpSigner
All Implemented Interfaces:
OpenPgpSigner

public class BouncyCastleOpenPgpSigner
extends Object
implements OpenPgpSigner

Bouncy Castle implementation of the OpenPGP signer.

Author:
Brett Porter

Field Summary
 
Fields inherited from interface org.apache.commons.openpgp.OpenPgpSigner
ROLE
 
Constructor Summary
BouncyCastleOpenPgpSigner()
           
 
Method Summary
 void detachedSign(InputStream data, OutputStream signature, String keyId, KeyRing keyRing, boolean asciiArmor)
          Sign a piece of data with the given key, storing the signature in a detached output.
 void sign(InputStream data, OutputStream signedOutput, String keyId, KeyRing keyRing, boolean asciiArmor)
          Sign a piece of data with the given key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BouncyCastleOpenPgpSigner

public BouncyCastleOpenPgpSigner()
Method Detail

sign

public void sign(InputStream data,
                 OutputStream signedOutput,
                 String keyId,
                 KeyRing keyRing,
                 boolean asciiArmor)
          throws OpenPgpException
Description copied from interface: OpenPgpSigner
Sign a piece of data with the given key.

Specified by:
sign in interface OpenPgpSigner
Parameters:
data - the data to sign
signedOutput - the signed output data
keyId - the key ID of the key used to sign it
keyRing - the keyring containing the key above
asciiArmor - whether to ascii armor the output
Throws:
OpenPgpException

detachedSign

public void detachedSign(InputStream data,
                         OutputStream signature,
                         String keyId,
                         KeyRing keyRing,
                         boolean asciiArmor)
                  throws OpenPgpException,
                         IOException
Description copied from interface: OpenPgpSigner
Sign a piece of data with the given key, storing the signature in a detached output.

Specified by:
detachedSign in interface OpenPgpSigner
Parameters:
data - the data to sign
signature - the detached signature
keyId - the key ID of the key used to sign it
keyRing - the keyring containing the key above
asciiArmor - whether to ascii armor the output
Throws:
OpenPgpException
IOException


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.