/// <summary>
 ///     Create KSI service with service protocol and service settings.
 /// </summary>
 /// <param name="signingServiceProtocol">signing service protocol</param>
 /// <param name="signingServiceCredentials">signing service credentials</param>
 /// <param name="extendingServiceProtocol">extending service protocol</param>
 /// <param name="extendingServiceCredentials">extending service credentials</param>
 /// <param name="publicationsFileServiceProtocol">publications file protocol</param>
 /// <param name="publicationsFileFactory">publications file factory</param>
 /// <param name="pduVersion">PDU version</param>
 public KsiService(IKsiSigningServiceProtocol signingServiceProtocol,
                   IServiceCredentials signingServiceCredentials,
                   IKsiExtendingServiceProtocol extendingServiceProtocol,
                   IServiceCredentials extendingServiceCredentials,
                   IKsiPublicationsFileServiceProtocol publicationsFileServiceProtocol,
                   IPublicationsFileFactory publicationsFileFactory,
                   PduVersion pduVersion)
     :
     this(signingServiceProtocol,
          signingServiceCredentials,
          extendingServiceProtocol,
          extendingServiceCredentials,
          publicationsFileServiceProtocol,
          publicationsFileFactory,
          new KsiSignatureFactory(),
          pduVersion)
 {
 }
        /// <summary>
        ///     Create KSI service with service protocol and service settings.
        /// </summary>
        /// <param name="signingServiceProtocol">signing service protocol</param>
        /// <param name="signingServiceCredentials">signing service credentials</param>
        /// <param name="extendingServiceProtocol">extending service protocol</param>
        /// <param name="extendingServiceCredentials">extending service credentials</param>
        /// <param name="publicationsFileServiceProtocol">publications file protocol</param>
        /// <param name="publicationsFileFactory">publications file factory</param>
        /// <param name="ksiSignatureFactory">KSI signature factory used when creating a KSI signature</param>
        /// <param name="pduVersion">PDU version to be used</param>
        public KsiService(IKsiSigningServiceProtocol signingServiceProtocol,
                          IServiceCredentials signingServiceCredentials,
                          IKsiExtendingServiceProtocol extendingServiceProtocol,
                          IServiceCredentials extendingServiceCredentials,
                          IKsiPublicationsFileServiceProtocol publicationsFileServiceProtocol,
                          IPublicationsFileFactory publicationsFileFactory,
                          IKsiSignatureFactory ksiSignatureFactory = null,
                          PduVersion?pduVersion = null)
        {
            _signingServiceProtocol          = signingServiceProtocol;
            _signingServiceCredentials       = signingServiceCredentials;
            _extendingServiceProtocol        = extendingServiceProtocol;
            _extendingServiceCredentials     = extendingServiceCredentials;
            _publicationsFileServiceProtocol = publicationsFileServiceProtocol;
            _publicationsFileFactory         = publicationsFileFactory;
            _ksiSignatureFactory             = ksiSignatureFactory ?? new KsiSignatureFactory();
            PduVersion = pduVersion ?? DefaultPduVersion;

            _signingMacAlgorithm   = _signingServiceCredentials?.MacAlgorithm ?? DefaultMacAlgorithm;
            _extendingMacAlgorithm = _extendingServiceCredentials?.MacAlgorithm ?? DefaultMacAlgorithm;
        }
Beispiel #3
0
 public TestKsiService(TestKsiServiceProtocol signingServiceProtocol,
                       IServiceCredentials signingServiceCredentials,
                       TestKsiServiceProtocol extendingServiceProtocol,
                       IServiceCredentials extendingServiceCredentials,
                       TestKsiServiceProtocol publicationsFileServiceProtocol,
                       IPublicationsFileFactory publicationsFileFactory,
                       ulong requestId,
                       PduVersion pduVersion)
     :
     base(signingServiceProtocol,
          signingServiceCredentials,
          extendingServiceProtocol,
          extendingServiceCredentials,
          publicationsFileServiceProtocol,
          publicationsFileFactory,
          pduVersion)
 {
     SigningServiceProtocol   = signingServiceProtocol;
     ExtendingServiceProtocol = extendingServiceProtocol;
     RequestId = requestId;
 }