Interface IExternalSignature
- Namespace
- iText.Signatures
- Assembly
- itext.sign.dll
Interface that needs to be implemented to do the actual signing.
public interface IExternalSignature
Remarks
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.
Methods
GetDigestAlgorithmName()
Returns the digest algorithm.
string GetDigestAlgorithmName()
Returns
- string
The digest algorithm (e.g. "SHA-1", "SHA-256,...").
GetSignatureAlgorithmName()
Returns the signature algorithm used for signing, disregarding the digest function.
string GetSignatureAlgorithmName()
Returns
- string
The signature algorithm ("RSA", "DSA", "ECDSA", "Ed25519" or "Ed448").
GetSignatureMechanismParameters()
Return the algorithm parameters that need to be encoded together with the signature mechanism identifier.
ISignatureMechanismParams GetSignatureMechanismParameters()
Returns
- ISignatureMechanismParams
algorithm parameters
Remarks
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.
Sign(byte[])
Signs the given message using the encryption algorithm in combination with the hash algorithm.
byte[] Sign(byte[] message)
Parameters
message
byte[]The message you want to be hashed and signed.
Returns
- byte[]
A signed message digest.