Interface IExternalSigner
- Namespace
- MiPdf.Signatures
- Assembly
- MiPdf.dll
A signer whose private key is not available as X509Certificate2 private key, e.g. an HSM, a smart card middleware, a cloud signing service or a remote key vault. Only the hash is sent to the signer.
public interface IExternalSigner
Properties
Certificate
The signer certificate (public part).
X509Certificate2 Certificate { get; }
Property Value
CertificateChain
Intermediate certificates to embed (may be empty).
IReadOnlyList<X509Certificate2> CertificateChain { get; }
Property Value
Methods
SignHash(byte[], HashAlgorithmName)
Signs a hash. RSA keys must return a PKCS#1 v1.5 signature; EC keys must return the signature in IEEE P1363 format (r || s).
byte[] SignHash(byte[] hash, HashAlgorithmName hashAlgorithm)
Parameters
hashbyte[]hashAlgorithmHashAlgorithmName
Returns
- byte[]
SignHash(byte[], HashAlgorithmName, RSASignaturePadding)
Signs a hash with an RSA key and the given padding (PKCS#1 v1.5 or PSS with a salt as long as the hash). The default implementation supports PKCS#1 v1.5 only; implement this method to support RSASSA-PSS.
byte[] SignHash(byte[] hash, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)
Parameters
hashbyte[]hashAlgorithmHashAlgorithmNamepaddingRSASignaturePadding
Returns
- byte[]