iText 7 7.2.5 API
iText.Signatures.IExternalSignature Interface Reference

Interface that needs to be implemented to do the actual signing. More...

Inheritance diagram for iText.Signatures.IExternalSignature:
iText.Signatures.AsymmetricAlgorithmSignature iText.Signatures.PrivateKeySignature

Public Member Functions

String  GetHashAlgorithm ()
  Returns the hash algorithm. More...
 
String  GetEncryptionAlgorithm ()
  Returns the encryption algorithm used for signing. More...
 
byte[]  Sign (byte[] message)
  Signs the given message using the encryption algorithm in combination with the hash algorithm. More...
 

Detailed Description

Interface that needs to be implemented to do the actual signing.

Interface that needs to be implemented to do the actual signing. For instance: you'll have to implement this interface if you want to sign a PDF using a smart card.

Paulo Soares

Member Function Documentation

◆ GetEncryptionAlgorithm()

String iText.Signatures.IExternalSignature.GetEncryptionAlgorithm ( )

Returns the encryption algorithm used for signing.

Returns
The encryption algorithm ("RSA" or "DSA").

Implemented in iText.Signatures.AsymmetricAlgorithmSignature, and iText.Signatures.PrivateKeySignature.

◆ GetHashAlgorithm()

String iText.Signatures.IExternalSignature.GetHashAlgorithm ( )

Returns the hash algorithm.

Returns
The hash algorithm (e.g. "SHA-1", "SHA-256,...").

Implemented in iText.Signatures.AsymmetricAlgorithmSignature, and iText.Signatures.PrivateKeySignature.

◆ Sign()

byte [] iText.Signatures.IExternalSignature.Sign ( byte[]  message )

Signs the given message using the encryption algorithm in combination with the hash algorithm.

Parameters
message The message you want to be hashed and signed.
Returns
A signed message digest.

Implemented in iText.Signatures.AsymmetricAlgorithmSignature, and iText.Signatures.PrivateKeySignature.