public OnboardingViewModel(IXDSSecService xdsCryptoService, AppRepository appRepository, DeviceVaultService deviceVaultService)
 {
     this.xdsCryptoService   = xdsCryptoService;
     this.appRepository      = appRepository;
     this.deviceVaultService = deviceVaultService;
     this.Name = ProfileViewModel.DefaultUsername;
 }
Esempio n. 2
0
        public AppRepository(FStoreConfig fStoreConfig, IXDSSecService xdsSecService)
        {
            this.profiles = new FStoreRepository <Profile>(new FStoreMono(fStoreConfig), RepositorySerializer.Serialize, RepositorySerializer.Deserialize <Profile>);
            this.contacts = new FStoreRepository <Identity>(new FStoreMono(fStoreConfig), RepositorySerializer.Serialize, RepositorySerializer.Deserialize <Identity>);
            this.messages = new FStoreRepository <Message>(new FStoreMono(fStoreConfig), RepositorySerializer.Serialize, RepositorySerializer.Deserialize <Message>);

            RepositorySerializer.XDSSecService = xdsSecService;
        }
Esempio n. 3
0
 public PortableChatEncryptionService(IDependencyInjection dependencyInjection, ILoggerFactory loggerFactory, IXDSSecService ixdsCryptoService, AppRepository appRepository, ProfileViewModel profileViewModel, E2ERatchet e2ERatchet)
 {
     this.logger            = loggerFactory.CreateLogger <PortableChatEncryptionService>();
     this.ixdsCryptoService = ixdsCryptoService;
     this.repo             = appRepository;
     this.profileViewModel = profileViewModel;
     this.e2ERatchet       = e2ERatchet;
 }
Esempio n. 4
0
 public TLSClient(ILoggerFactory loggerFactory, IChatClient chatClient, IXDSSecService ixdsCryptoService, ITcpConnection tcpConnection, IUdpConnection udpConnection, AppState appState)
 {
     this._log              = loggerFactory.CreateLogger <TLSClient>();
     this._chatClient       = chatClient;
     this.ixdsCryptoService = ixdsCryptoService;
     this._tcp              = tcpConnection;
     this._udp              = udpConnection;
     this._appState         = appState;
 }
 public TLSClientRatchet(string myId, byte[] myPrivateKey, TLSUser server, IXDSSecService ixdsCryptoService)
 {
     Guard.NotNull(myId, myPrivateKey, server, ixdsCryptoService);
     Guard.NotNull(server.StaticPublicKey);
     this.MyId               = myId;
     this._myIdBytes         = Encoding.UTF8.GetBytes(this.MyId);
     this._server            = server;
     this.ixdsCryptoService  = ixdsCryptoService;
     this._server.AuthSecret = this.ixdsCryptoService.CalculateAndHashSharedSecret(myPrivateKey, this._server.StaticPublicKey);
 }
Esempio n. 6
0
 public SetupView(Toplevel topLevel) : base(topLevel)
 {
     this.mainWindow              = (Window)topLevel;
     this.messageBoxService       = App.ServiceProvider.Get <IMessageBoxService>();
     this.onboardingViewModel     = App.ServiceProvider.Get <OnboardingViewModel>();
     this.stopwatch               = new Stopwatch();
     this.xdsSecService           = App.ServiceProvider.Get <IXDSSecService>();
     this.chatClientConfiguration = App.ServiceProvider.GetService <IChatClientConfiguration>();
     this.cancellation            = App.ServiceProvider.Get <ICancellation>();
 }
Esempio n. 7
0
 public static IXDSSecService Instance()
 {
     if (_visualCrypt2Service == null)
     {
         lock (lockObject)
         {
             if (_visualCrypt2Service == null)
             {
                 _visualCrypt2Service = new XDSSecService();
                 _visualCrypt2Service.Init(new Platform_NetStandard());
             }
         }
     }
     return(_visualCrypt2Service);
 }
Esempio n. 8
0
 public ChatWorker(ILoggerFactory loggerFactory, ICancellation cancellation, AppState appState, AppRepository appRepository, ITcpConnection tcpConnection, IUdpConnection udpConnection, IChatClient chatClient, IXDSSecService ixdsCryptoService, IChatEncryptionService chatEncryptionService, E2ERatchet e2eRatchet, ContactListManager contactListManager)
 {
     this.logger                = loggerFactory.CreateLogger <ChatWorker>();
     this.appState              = appState;
     this.repo                  = appRepository;
     this.tcp                   = tcpConnection;
     this.udp                   = udpConnection;
     this.chatClient            = chatClient;
     this.ixdsCryptoService     = ixdsCryptoService;
     this.chatEncryptionService = chatEncryptionService;
     this.e2eRatchet            = e2eRatchet;
     this.contactListManager    = contactListManager;
     this.cancellation          = cancellation;
     cancellation.RegisterWorker(this);
 }
Esempio n. 9
0
 public TLSServerRatchet(string serverId, byte[] serverPrivateKey, IXDSSecService ixdsCryptoService)
 {
     this.ServerId          = serverId;
     this._serverPrivateKey = serverPrivateKey;
     this.ixdsCryptoService = ixdsCryptoService;
 }
Esempio n. 10
0
 public PrincipalFactory(IXDSSecService xdsCryptoService)
 {
     this.xdsCryptoService = xdsCryptoService;
 }
Esempio n. 11
0
 public TLSRequestHandler(string nodeId, IXDSSecService visualCrypt2Service, CommandProcessor commandProcessor, ILoggerFactory loggerFactory)
 {
     this.commandProcessor = commandProcessor;
     this.tlsServerRatchet = new TLSServerRatchet(nodeId, NodeKeys.NodePrivateKey, visualCrypt2Service);
     this.logger           = loggerFactory.CreateLogger(this.GetType().FullName);
 }
Esempio n. 12
0
 public DeviceVaultService(AppRepository appRepository, IXDSSecService xdsCryptoService)
 {
     this.repo             = appRepository;
     this.xdsCryptoService = xdsCryptoService;
 }
Esempio n. 13
0
 public E2ERatchet(IXDSSecService ixdsCryptoService)
 {
     this.ixdsCryptoService = ixdsCryptoService;
 }