Class PrivateKeySignature

java.lang.Object
com.itextpdf.text.pdf.security.PrivateKeySignature
All Implemented Interfaces:
ExternalSignature

public class PrivateKeySignature extends Object implements ExternalSignature
Implementation of the ExternalSignature interface that can be used when you have a PrivateKey object.
  • Field Details

    • pk

      private PrivateKey pk
      The private key object.
    • hashAlgorithm

      private String hashAlgorithm
      The hash algorithm.
    • encryptionAlgorithm

      private String encryptionAlgorithm
      The encryption algorithm (obtained from the private key)
    • provider

      private String provider
      The security provider
  • Constructor Details

    • PrivateKeySignature

      public PrivateKeySignature(PrivateKey pk, String hashAlgorithm, String provider)
      Creates an ExternalSignature instance
      Parameters:
      pk - a PrivateKey object
      hashAlgorithm - the hash algorithm (e.g. "SHA-1", "SHA-256",...)
      provider - the security provider (e.g. "BC")
  • Method Details