Class PgpSignatoryInternal

All Implemented Interfaces:
Signatory

class PgpSignatoryInternal extends PgpSignatory
This is an implementation of PgpSignatory that uses PgpSignatoryService to cache computed keys.
  • Constructor Details

    • PgpSignatoryInternal

      public PgpSignatoryInternal(Provider<org.gradle.plugins.signing.signatory.internal.pgp.PgpSignatoryService> signatoryService, String name, Provider<org.bouncycastle.openpgp.PGPSecretKey> secretKey, Provider<org.bouncycastle.openpgp.PGPPrivateKey> privateKey)
  • Method Details

    • getSignatoryService

      @ServiceReference public Provider<org.gradle.plugins.signing.signatory.internal.pgp.PgpSignatoryService> getSignatoryService()
      A reference to the signatory service to adhere to the contract of Task.usesService(Provider). The service is used as a base of secretKey and privateKey providers.
    • sign

      public void sign(InputStream toSign, OutputStream signatureDestination)
      Description copied from class: PgpSignatory
      Exhausts toSign, and writes the signature to signatureDestination. The caller is responsible for closing the streams, though the output WILL be flushed.
      Specified by:
      sign in interface Signatory
      Overrides:
      sign in class PgpSignatory
      Parameters:
      toSign - The source of the data to be signed
      signatureDestination - Where the signature will be written to