org.apache.commons.openpgp
Interface OpenPgpSigner
- BouncyCastleOpenPgpSigner
public interface OpenPgpSigner
Interface for signing data with OpenPGP.
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.
|
ROLE
public static final String ROLE
detachedSign
public void detachedSign(InputStream data,
OutputStream signature,
String keyId,
KeyRing keyRing,
boolean asciiArmor)
throws OpenPgpException,
IOException
Sign a piece of data with the given key, storing the signature in a detached output.
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
sign
public void sign(InputStream data,
OutputStream signedOutput,
String keyId,
KeyRing keyRing,
boolean asciiArmor)
throws OpenPgpException
Sign a piece of data with the given key.
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