iText 8.0.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  GetDigestAlgorithmName ()
  Returns the digest algorithm. More...
 
String  GetSignatureAlgorithmName ()
  Returns the signature algorithm used for signing, disregarding the digest function. More...
 
ISignatureMechanismParams  GetSignatureMechanismParameters ()
  Return the algorithm parameters that need to be encoded together with the signature mechanism identifier. 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.

Member Function Documentation

◆ GetDigestAlgorithmName()

String iText.Signatures.IExternalSignature.GetDigestAlgorithmName ( )

Returns the digest algorithm.

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

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

◆ GetSignatureAlgorithmName()

String iText.Signatures.IExternalSignature.GetSignatureAlgorithmName ( )

Returns the signature algorithm used for signing, disregarding the digest function.

Returns
The signature algorithm ("RSA", "DSA", "ECDSA", "Ed25519" or "Ed448").

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

◆ GetSignatureMechanismParameters()

ISignatureMechanismParams iText.Signatures.IExternalSignature.GetSignatureMechanismParameters ( )

Return the algorithm parameters that need to be encoded together with the signature mechanism identifier.

Return the algorithm parameters that need to be encoded together with the signature mechanism identifier. If there are no parameters, return null. A non-null value is required for RSASSA-PSS; see RSASSAPSSMechanismParams.

Returns
algorithm parameters

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

◆ 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.PrivateKeySignature, and iText.Signatures.AsymmetricAlgorithmSignature.