Signatorypublic class PgpSignatory extends SignatorySupport
| Constructor | Description |
|---|---|
PgpSignatory(java.lang.String name,
org.bouncycastle.openpgp.PGPSecretKey secretKey,
java.lang.String password) |
| Modifier and Type | Method | Description |
|---|---|---|
org.bouncycastle.openpgp.PGPSignatureGenerator |
createSignatureGenerator() |
|
java.lang.String |
getKeyId() |
Returns the id of the key that will be used for signing.
|
java.lang.String |
getName() |
An identifying name for this signatory.
|
void |
sign(java.io.InputStream toSign,
java.io.OutputStream signatureDestination) |
Exhausts
toSign, and writes the signature to signatureDestination. |
signpublic PgpSignatory(java.lang.String name,
org.bouncycastle.openpgp.PGPSecretKey secretKey,
java.lang.String password)
public final java.lang.String getName()
SignatoryAn identifying name for this signatory.
The name must be constant for the life of the signatory and should uniquely identify it within a project.
public void sign(java.io.InputStream toSign,
java.io.OutputStream signatureDestination)
toSign, and writes the signature to signatureDestination.
The caller is responsible for closing the streams, though the output WILL be flushed.toSign - The source of the data to be signedsignatureDestination - Where the signature will be written topublic java.lang.String getKeyId()
Signatorypublic org.bouncycastle.openpgp.PGPSignatureGenerator createSignatureGenerator()