org.apache.commons.openpgp
Class BouncyCastleOpenPgpStreamingSigner
java.lang.Object
org.apache.commons.openpgp.BouncyCastleOpenPgpStreamingSigner
- All Implemented Interfaces:
- OpenPgpStreamingSigner
public class BouncyCastleOpenPgpStreamingSigner
- extends Object
- implements OpenPgpStreamingSigner
Bouncy Castle implementation of the OpenPGP signer.
- Author:
- Brett Porter
Method Summary |
byte[] |
finish()
Finish creating the signature. |
void |
update(byte[] buf)
Update the signature with the next block from the data buffer. |
void |
update(byte[] buf,
int offset,
int length)
Update the signature with the next block from the data buffer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BouncyCastleOpenPgpStreamingSigner
public BouncyCastleOpenPgpStreamingSigner(String keyId,
KeyRing keyRing,
boolean asciiArmor)
throws OpenPgpException
- Throws:
OpenPgpException
BouncyCastleOpenPgpStreamingSigner
public BouncyCastleOpenPgpStreamingSigner(OutputStream signature,
String keyId,
KeyRing keyRing,
boolean asciiArmor)
throws OpenPgpException
- Throws:
OpenPgpException
update
public void update(byte[] buf)
throws OpenPgpException
- Description copied from interface:
OpenPgpStreamingSigner
- Update the signature with the next block from the data buffer.
- Specified by:
update
in interface OpenPgpStreamingSigner
- Parameters:
buf
- the buffer
- Throws:
OpenPgpException
- if the buffer is not valid for updating the signature
update
public void update(byte[] buf,
int offset,
int length)
throws OpenPgpException
- Description copied from interface:
OpenPgpStreamingSigner
- Update the signature with the next block from the data buffer.
- Specified by:
update
in interface OpenPgpStreamingSigner
- Parameters:
buf
- the bufferoffset
- offset within the buffer to start fromlength
- number of bytes in the buffer to read from
- Throws:
OpenPgpException
- if the buffer is not valid for updating the signature
finish
public byte[] finish()
throws OpenPgpException,
IOException
- Description copied from interface:
OpenPgpStreamingSigner
- Finish creating the signature.
- Specified by:
finish
in interface OpenPgpStreamingSigner
- Returns:
- the completed signature
- Throws:
OpenPgpException
- if the signature is not in a consistent or complete state
IOException
Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.