Class SigningOptions.SigningMethod
java.lang.Object
org.pgpainless.encryption_signing.SigningOptions.SigningMethod
- Enclosing class:
- SigningOptions
A method of signing.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SigningOptions.SigningMethod
detachedSignature
(org.bouncycastle.openpgp.PGPSignatureGenerator signatureGenerator, HashAlgorithm hashAlgorithm) Detached signing method.org.bouncycastle.openpgp.PGPSignatureGenerator
static SigningOptions.SigningMethod
inlineSignature
(org.bouncycastle.openpgp.PGPSignatureGenerator signatureGenerator, HashAlgorithm hashAlgorithm) Inline-signature method.boolean
-
Method Details
-
inlineSignature
public static SigningOptions.SigningMethod inlineSignature(@Nonnull org.bouncycastle.openpgp.PGPSignatureGenerator signatureGenerator, @Nonnull HashAlgorithm hashAlgorithm) Inline-signature method. The resulting signature will be written into the message itself, together with a one-pass-signature packet.- Parameters:
signatureGenerator
- signature generatorhashAlgorithm
- hash algorithm used to generate the signature- Returns:
- inline signing method
-
detachedSignature
public static SigningOptions.SigningMethod detachedSignature(@Nonnull org.bouncycastle.openpgp.PGPSignatureGenerator signatureGenerator, @Nonnull HashAlgorithm hashAlgorithm) Detached signing method. The resulting signature will not be added to the message, and instead can be distributed separately to the signed message.- Parameters:
signatureGenerator
- signature generatorhashAlgorithm
- hash algorithm used to generate the signature- Returns:
- detached signing method
-
isDetached
public boolean isDetached() -
getSignatureGenerator
public org.bouncycastle.openpgp.PGPSignatureGenerator getSignatureGenerator() -
getHashAlgorithm
-