Class PrivateKeySignature
- Namespace
- iText.Signatures
- Assembly
- itext.sign.dll
Implementation of the IExternalSignature interface that can be used when you have a iText.Commons.Bouncycastle.Crypto.IPrivateKey object.
public class PrivateKeySignature : IExternalSignature
- Inheritance
-
PrivateKeySignature
- Implements
- Inherited Members
Constructors
PrivateKeySignature(IPrivateKey, string)
Creates a PrivateKeySignature instance.
public PrivateKeySignature(IPrivateKey pk, string hashAlgorithm)
Parameters
pk
IPrivateKeyA iText.Commons.Bouncycastle.Crypto.IPrivateKey object.
hashAlgorithm
stringA hash algorithm (e.g. "SHA-1", "SHA-256",...).
PrivateKeySignature(IPrivateKey, string, string, IApplicableSignatureParams)
Creates a PrivateKeySignature instance.
public PrivateKeySignature(IPrivateKey pk, string hashAlgorithm, string signatureAlgorithm, IApplicableSignatureParams @params)
Parameters
pk
IPrivateKeyA iText.Commons.Bouncycastle.Crypto.IPrivateKey object.
hashAlgorithm
stringA hash algorithm (e.g. "SHA-1", "SHA-256",...).
signatureAlgorithm
stringA signiture algorithm (e.g. "RSASSA-PSS", "id-signedData", "sha256WithRSAEncryption", ...)
params
IApplicableSignatureParamsParameters for using RSASSA-PSS or other algorithms requiring them.
Methods
GetDigestAlgorithmName()
public virtual string GetDigestAlgorithmName()
Returns
GetSignatureAlgorithmName()
public virtual string GetSignatureAlgorithmName()
Returns
GetSignatureMechanismParameters()
public virtual ISignatureMechanismParams GetSignatureMechanismParameters()
Returns
Sign(byte[])
public virtual byte[] Sign(byte[] message)
Parameters
message
byte[]
Returns
- byte[]