/// <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)); } }
/// <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; }
/// <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; }
/// <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; }