iText 7 7.2.5 API
iText.Signatures.PrivateKeySignature Class Reference

Implementation of the IExternalSignature interface that can be used when you have a Org.BouncyCastle.Crypto.ICipherParameters object. More...

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

Public Member Functions

  PrivateKeySignature (ICipherParameters pk, String hashAlgorithm)
  Creates a PrivateKeySignature instance. More...
 
virtual String  GetHashAlgorithm ()
  Returns the hash algorithm. More...
 
virtual String  GetEncryptionAlgorithm ()
  Returns the encryption algorithm used for signing. More...
 
virtual byte[]  Sign (byte[] message)
  Signs the given message using the encryption algorithm in combination with the hash algorithm. More...
 

Detailed Description

Implementation of the IExternalSignature interface that can be used when you have a Org.BouncyCastle.Crypto.ICipherParameters object.

Paulo Soares

Constructor & Destructor Documentation

◆ PrivateKeySignature()

iText.Signatures.PrivateKeySignature.PrivateKeySignature ( ICipherParameters  pk,
String  hashAlgorithm 
)
inline

Creates a PrivateKeySignature instance.

Parameters
pk A Org.BouncyCastle.Crypto.ICipherParameters object.
hashAlgorithm A hash algorithm (e.g. "SHA-1", "SHA-256",...).
provider A security provider (e.g. "BC").

Member Function Documentation

◆ GetEncryptionAlgorithm()

virtual String iText.Signatures.PrivateKeySignature.GetEncryptionAlgorithm ( )
inlinevirtual

Returns the encryption algorithm used for signing.

Implements iText.Signatures.IExternalSignature.

◆ GetHashAlgorithm()

virtual String iText.Signatures.PrivateKeySignature.GetHashAlgorithm ( )
inlinevirtual

Returns the hash algorithm.

Implements iText.Signatures.IExternalSignature.

◆ Sign()

virtual byte [] iText.Signatures.PrivateKeySignature.Sign ( byte[]  message )
inlinevirtual

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

Implements iText.Signatures.IExternalSignature.