コード例 #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));
     }
 }
コード例 #2
0
ファイル: XpsSignature.cs プロジェクト: AnirudhMergu/Krypton
 /// <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;
 }
コード例 #3
0
ファイル: XmlSignature.cs プロジェクト: AnirudhMergu/Krypton
 /// <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;
 }
コード例 #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;
 }