Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of OfficeSign class.
 /// </summary>
 /// <param name="librarySerialNumberLicense">The serial number provided to register the library.</param>
 public OfficeSignature(string librarySerialNumberLicense)
 {
     try
     {
         Licensing.CheckLicense(librarySerialNumberLicense);
     }
     catch (Exception exception)
     {
         throw new ArgumentException(string.Concat("Licensing error: ", exception.Message));
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of XPSSign class.
 /// </summary>
 /// <param name="librarySerialNumberLicense">The serial number provided to register the library.</param>
 public XpsSignature(string librarySerialNumberLicense)
 {
     try
     {
         Licensing.CheckLicense(librarySerialNumberLicense);
     }
     catch (Exception exception)
     {
         throw new ArgumentException(string.Concat("Licensing error: ", exception.Message));
     }
     this.AllowMultipleSignatures = false;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of XMLSign class.
 /// </summary>
 /// <param name="librarySerialNumberLicense">The serial number provided to register the library.</param>
 public XmlSignature(string librarySerialNumberLicense)
 {
     try
     {
         Licensing.CheckLicense(librarySerialNumberLicense);
     }
     catch (Exception exception)
     {
         throw new ArgumentException(string.Concat("Licensing error: ", exception.Message));
     }
     this.IncludeKeyInfo = true;
     this.IncludeSignatureCertificate = true;
     this.RemoveWhitespaces           = true;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of XMLSign class.
 /// </summary>
 /// <param name="librarySerialNumberLicense">The serial number provided to register the library.</param>
 public XmlSignatureSha256(string librarySerialNumberLicense)
 {
     try
     {
         Licensing.CheckLicense(librarySerialNumberLicense);
     }
     catch (Exception exception)
     {
         throw new ArgumentException(string.Concat("Licensing error: ", exception.Message));
     }
     try
     {
         CryptoConfig.AddAlgorithm(typeof(RSAPKCS1SHA256SignatureDescription), new string[] { "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" });
     }
     catch
     {
     }
     this.IncludeKeyInfo = true;
     this.IncludeSignatureCertificate = true;
     this.RemoveWhitespaces           = true;
 }