|
In order to use SecureXML Digital Signature from the .NET development
environment, you would need to add a reference to this component
in your project environment. In order to create a reference to the
SecureXML Digital Signature Type Library, please click on Project
pull down menu and select Add Reference
At this point you
will be presented with a dialog box with a list of available references.
Click on "Com" tab and then locate and select an entry
called "Infomosaic SecureXML Digital Signature 1.0 Type Library".
If you don't find this entry, click on the browse button and locate
and select XMLSign.dll in C:\Program Files\Infomosaic\SecureXML
directory or the SecureXML install directory if you chose a different
directory during installation.
Once a reference has been created please do the following:
From C#:
public XMLSIGNLib.Signature SigObj;
SigObj = new XMLSIGNLib.SignatureClass();
if (SigObj.CertificateCount == 0)
{
MessageBox.Show("You don't have any PKI Certificates installed.
Only HMAC Signatures can be created", "Warning",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
From VB.NET:
Public SigObj As XMLSIGNLib.Signature
SigObj = New XMLSIGNLib.Signature()
If SigObj.CertificateCount = 0 Then
MessageBox.Show("You don't have any PKI Certificates installed.
Only HMAC Signatures can be created", "Warning",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End If
|