예제 #1
0
        public SLPClientConnector(
            INameResolverFactory <IAsymetricCrypt> asymetricCryptFactory,
            ISymetricCrypt symetric,
            ISerializerFactory serializeT,
            ILogger logger,
            IHash hash,
            IPersistentPrivateKeyProvider persistentPrivateKeyProvider,
            ICompression compression,
            ISecureProtocolHandshake secureProtocolHandshake,
            IClientConnector clientConnector,
            IOptions <SLJPOption> sljpOptions = null
            )
        {
            this.asymetricForDecrypt = asymetricCryptFactory.Resolve();
            this.asymetricToEncrypt  = asymetricCryptFactory.Resolve();
            this.firstAsymetricHandshakeToDecrypt = asymetricCryptFactory.Resolve();
            this.firstAsymetricHandshakeToEncrypt = asymetricCryptFactory.Resolve();

            this.textPlainTCPChannel = clientConnector;

            this.symetric   = symetric;
            this.serializeT = serializeT.Resolve(SerializerType.Json);
            this.logger     = logger;
            this.hash       = hash;
            this.IPersistentPrivateKeyProvider = persistentPrivateKeyProvider;
            this.compression             = compression;
            this.secureProtocolHandshake = secureProtocolHandshake;
            var SecurityMaxSizeToReceive = sljpOptions.Value.SecurityMaxSizeToReceive;

            this.sljpOptions = sljpOptions.Value ?? new SLJPOption();
        }
예제 #2
0
 public SLPServerConnector(
     IClientConnectorFactoryProducer clientConnectorFactoryProducer,
     INameResolverFactory <IAsymetricCrypt> asymetricCryptFactory,
     ISerializerFactory serializer,
     IServerConnectorFactory serverFactory,
     ILogger ILogger,
     IHash IHash
     )
 {
     this.clientConnectorFactoryProducer = clientConnectorFactoryProducer;
     this.asymetricCryptFactory          = asymetricCryptFactory;
     this.serialize = serializer.Resolve(SerializerType.Json);
     this.tcpServer = serverFactory.Create(ConnectorFactory.TransmissionControlProtocol); //Plain Text
     this.logger    = ILogger;
     this.hash      = IHash;
 }