Allows a signature provider add-in to create a hash value for the document that you can use to determine if the document contents were tampered with after digital signing.
expression. HashStream( ** QueryContinue, ** Stream )
expression An expression that returns a SignatureProvider object.
Name | Required/Optional | Data Type | Description |
---|---|---|---|
QueryContinue | Required | IQueryContinue | Provides a way to query the host application for permission to continue the hashing process. |
Stream | Required | IStream | Contains the data stream. |
Byte
The SignatureProvider object is used exclusively in custom signature provider add-ins. This method is called once per signature data stream in a document. The return value is an array of bytes representing the hash value computed using the hash algorithm.
The following example gets the hash value of a data stream.
public Array HashStream(object queryContinue, object stream)
{
using (COMStream comstream = new COMStream(stream))
{
using (HashAlgorithm hashalg = HashAlgorithm.Create(this.HashAlgorithmName))
{
return hashalg.ComputeHash(comstream);
}
}
}
Note Signature providers are implemented exclusively in custom COM add-ins and cannot be implemented in Microsoft Visual Basic for Applications (VBA).