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(); }
public void Init() { Container smapContainer = new Container(); c = new SMContainer(smapContainer); c.Configuration.Configure((IRegister cnf) => { cnf.RegisterAllNetXP(); }); this.ISymetric = this.c.Resolve <ISymetricCrypt>(); }
public void Init() { var container = new Container(); c = new SMContainer(container); container.Configure(cnf => { SMRegisterExpression smre = new SMRegisterExpression(cnf, container); CompositionRoot.AddNetXPNetFrameworkRegisters(smre, c); }); this.ISymetric = this.c.Resolve <ISymetricCrypt>(); }