org.apache.commons.openpgp
Class BouncyCastleOpenPgpSigner
java.lang.Object
org.apache.commons.openpgp.BouncyCastleOpenPgpSigner
- All Implemented Interfaces:
- OpenPgpSigner
public class BouncyCastleOpenPgpSigner
- extends java.lang.Object
- implements OpenPgpSigner
Bouncy Castle implementation of the OpenPGP signer.
- Author:
- Brett Porter
Method Summary |
void |
detachedSign(java.io.InputStream data,
java.io.OutputStream signature,
java.lang.String keyId,
KeyRing keyRing,
boolean asciiArmor)
Sign a piece of data with the given key, storing the signature in a detached output. |
void |
sign(java.io.InputStream data,
java.io.OutputStream signedOutput,
java.lang.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 |
BouncyCastleOpenPgpSigner
public BouncyCastleOpenPgpSigner()
sign
public void sign(java.io.InputStream data,
java.io.OutputStream signedOutput,
java.lang.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 signsignedOutput
- the signed output datakeyId
- the key ID of the key used to sign itkeyRing
- the keyring containing the key aboveasciiArmor
- whether to ascii armor the output
- Throws:
OpenPgpException
detachedSign
public void detachedSign(java.io.InputStream data,
java.io.OutputStream signature,
java.lang.String keyId,
KeyRing keyRing,
boolean asciiArmor)
throws OpenPgpException,
java.io.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 signsignature
- the detached signaturekeyId
- the key ID of the key used to sign itkeyRing
- the keyring containing the key aboveasciiArmor
- whether to ascii armor the output
- Throws:
OpenPgpException
java.io.IOException