mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-17 18:02:05 +01:00
Add SigningOptions.addDetachedSignature(protector, key) shortcut method
This commit is contained in:
parent
39ff2bca73
commit
d1001412a1
1 changed files with 17 additions and 0 deletions
|
@ -252,6 +252,23 @@ public final class SigningOptions {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached signature.
|
||||
* The signature will be of type {@link DocumentSignatureType#BINARY_DOCUMENT}.
|
||||
*
|
||||
* @param secretKeyDecryptor decryptor to unlock the secret signing key
|
||||
* @param signingKey signing key
|
||||
* @return this
|
||||
*
|
||||
* @throws KeyException if something is wrong with the key
|
||||
* @throws PGPException if the key cannot be validated or unlocked, or if no signature method can be created
|
||||
*/
|
||||
public SigningOptions addDetachedSignature(SecretKeyRingProtector secretKeyDecryptor,
|
||||
PGPSecretKeyRing signingKey)
|
||||
throws PGPException {
|
||||
return addDetachedSignature(secretKeyDecryptor, signingKey, DocumentSignatureType.BINARY_DOCUMENT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached signature.
|
||||
* Detached signatures are not being added into the PGP message itself.
|
||||
|
|
Loading…
Reference in a new issue